summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/numericplots/MultiplePlots.tex
blob: e286e1fa9cfb11dc7b72fd1f1f3e34ac473340c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
% Copyright 2010 Thomas König, Alexander Michel
%
% This file is part of NumericPlots.
%
% NumericPlots is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% any later version.
%
% NumericPlots is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with NumericPlots.  If not, see <http://www.gnu.org/licenses/>.


\section{Multiple plots in one picture}\label{sec:MultiplePlots}

xPicMin, xPicMax, yPicMin and yPicMax are the inner coordinates of one picture.
The position of the axes are defined in this coordinate system via xCoordMin,
xCoordMax, yCoordMin and yCoordMax.

Example:

\begin{verbatim}
% input data and define linestyles
\input{DataTestRealData}
\newpsstyle{Database}{linecolor=LineColorA, linestyle=none, dotstyle=*,
showpoints=true, dotsize=5pt}
\newpsstyle{Result}{linecolor=LineColorB, linestyle=none, dotstyle=+,
showpoints=true, dotsize=10pt}

\begin{center}
	\begin{NumericDataPlot}[xPicMin=0, xPicMax=1050,
	yPicMin=0, yPicMax=1450]{\textwidth}{0.75\textheight}
		
		% --- definition of the axis and the grid ---
		% set the axis of the lower left corner
		\setxAxis{xMin=2, xMax=17, Dx=4, xCoordMin=0, xCoordMax=500}
		\setyAxis{yMin=20, yMax=70, Dy=20, yCoordMin=0, yCoordMax=500}
		
		% plot the axis of the lower left corner
		\plotxAxis{Stichnummer}
		\plotyAxis{$F_{roll}$ in $\mega\newton$}

		\listplot[style=Database]{\DataDBforce}
		\listplot[style=Result]{\DataRESforce}
		\listplot[style=StdLineStyC]{\DataDBforceC}
		\listplot[style=StdLineStyD]{\DataDBforceD}
		\listplot[style=StdLineStyE]{\DataDBforceE}
		\listplot[style=StdLineStyF]{\DataDBforceF}
		\listplot[style=StdLineStyG]{\DataDBforceG}
		
		% set the y-axis for the plot in the middle of the left side
		% x-axis remains the same
		\setyAxis{yMin=20, yMax=70, Dy=20, yCoordMin=550, yCoordMax=1050}
		% plot the axis (x-axis without ticklabels and label
		\plotxAxis[NoTickLabel, NoLabel]{}
		\plotyAxis{$F_{roll}$ in $\mega\newton$}
		
		\rput[t]{0}(250,550){a) Ein plot}

		\listplot[style=Database]{\DataDBforce}
		\listplot[style=Result]{\DataRESforce}
		
		% set axis for the plot at the right side
		\setxAxis{xMin=2, xMax=17, Dx=4, xCoordMin=600, xCoordMax=1050}
		\setyAxis{yMin=20, yMax=70, Dy=10, yCoordMin=0, yCoordMax=1050}
		
		% plot the axis at the right side (y-axis without label)
		\plotxAxis{Stichnummer}
		\plotyAxis[NoLabel, TickSep=10]{$F_{roll}$ in $\mega\newton$}

		\listplot[style=Database]{\DataDBforce}
		\listplot[style=Result]{\DataRESforce}
		\listplot[style=StdLineStyC]{\DataDBforceC}
		\listplot[style=StdLineStyD]{\DataDBforceD}
		\listplot[style=StdLineStyE]{\DataDBforceE}
		\listplot[style=StdLineStyF]{\DataDBforceF}
		\listplot[style=StdLineStyG]{\DataDBforceG}
		
		% set the axis for the plot at the top
		\setxAxis{xMin=8, xMax=17, Dx=1, xCoordMin=0, xCoordMax=1050}
		\setyAxis{yMin=35, yMax=65, Dy=10, yO=40, yCoordMin=1150, yCoordMax=1450}
		
		% plot the axis for the plot at the top
		\plotxAxis[NoLabel]{Stichnummer}
		\plotyAxis[NoLabel]{$F_{roll}$ in $\mega\newton$}

		% plot only part of the data
		\listplot[style=Database, xStart=11, xEnd=17]{\DataDBforce}
		\listplot[style=Result, xStart=8, xEnd=13]{\DataRESforce}
		
	\end{NumericDataPlot}
	
	% put legend outside of the plot
	\LegendDefinition[nrCols=1, LabelOrientation=r]{
		\LegLine{Database} & Werte aus der Datenbank \\
		\LegLine{Result} & Modell}
		
\end{center}
\end{verbatim}

% input data and define linestyles
\input{DataTestRealData}
\newpsstyle{Database}{linecolor=LineColorA, linestyle=none, dotstyle=*,
showpoints=true, dotsize=5pt}
\newpsstyle{Result}{linecolor=LineColorB, linestyle=none, dotstyle=+,
showpoints=true, dotsize=10pt}

\begin{center}
	\begin{NumericDataPlot}[xPicMin=0, xPicMax=1050,
	yPicMin=0, yPicMax=1450]{\textwidth}{0.75\textheight}
		
		% --- definition of the axis and the grid ---
		% set the axis of the lower left corner
		\setxAxis{xMin=2, xMax=17, Dx=4, xCoordMin=0, xCoordMax=500}
		\setyAxis{yMin=20, yMax=70, Dy=20, yCoordMin=0, yCoordMax=500}
		
		% plot the axis of the lower left corner
		\plotxAxis{Stichnummer}
		\plotyAxis{$F_{roll}$ in $\mega\newton$}

		\listplot[style=Database]{\DataDBforce}
		\listplot[style=Result]{\DataRESforce}
		\listplot[style=StdLineStyC]{\DataDBforceC}
		\listplot[style=StdLineStyD]{\DataDBforceD}
		\listplot[style=StdLineStyE]{\DataDBforceE}
		\listplot[style=StdLineStyF]{\DataDBforceF}
		\listplot[style=StdLineStyG]{\DataDBforceG}
		
		% set the y-axis for the plot in the middle of the left side
		% x-axis remains the same
		\setyAxis{yMin=20, yMax=70, Dy=20, yCoordMin=550, yCoordMax=1050}
		% plot the axis (x-axis without ticklabels and label
		\plotxAxis[NoTickLabel, NoLabel]{}
		\plotyAxis{$F_{roll}$ in $\mega\newton$}
		
		\rput[t]{0}(250,550){a) Ein plot}

		\listplot[style=Database]{\DataDBforce}
		\listplot[style=Result]{\DataRESforce}
		
		% set axis for the plot at the right side
		\setxAxis{xMin=2, xMax=17, Dx=4, xCoordMin=600, xCoordMax=1050}
		\setyAxis{yMin=20, yMax=70, Dy=10, yCoordMin=0, yCoordMax=1050}
		
		% plot the axis at the right side (y-axis without label)
		\plotxAxis{Stichnummer}
		\plotyAxis[NoLabel, TickSep=10]{$F_{roll}$ in $\mega\newton$}

		\listplot[style=Database]{\DataDBforce}
		\listplot[style=Result]{\DataRESforce}
		\listplot[style=StdLineStyC]{\DataDBforceC}
		\listplot[style=StdLineStyD]{\DataDBforceD}
		\listplot[style=StdLineStyE]{\DataDBforceE}
		\listplot[style=StdLineStyF]{\DataDBforceF}
		\listplot[style=StdLineStyG]{\DataDBforceG}
		
		% set the axis for the plot at the top
		\setxAxis{xMin=8, xMax=17, Dx=1, xCoordMin=0, xCoordMax=1050}
		\setyAxis{yMin=35, yMax=65, Dy=10, yO=40, yCoordMin=1150, yCoordMax=1450}
		
		% plot the axis for the plot at the top
		\plotxAxis[NoLabel]{Stichnummer}
		\plotyAxis[NoLabel]{$F_{roll}$ in $\mega\newton$}

		% plot only part of the data
		\listplot[style=Database, xStart=11, xEnd=17]{\DataDBforce}
		\listplot[style=Result, xStart=8, xEnd=13]{\DataRESforce}
		
	\end{NumericDataPlot}
	
	% put legend outside of the plot
	\LegendDefinition[nrCols=1, LabelOrientation=r]{
		\LegLine{style=Database} & Werte aus der Datenbank \\
		\LegLine{style=Result} & Modell}
\end{center}