% Copyright 2010 Thomas Koenig, 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]{\DataA}
		\listplot[style=Result]{\DataB}
		\listplot[style=StdLineStyC]{\DataC}
		\listplot[style=StdLineStyD]{\DataD}
		\listplot[style=StdLineStyE]{\DataE}
		\listplot[style=StdLineStyF]{\DataF}
		\listplot[style=StdLineStyG]{\DataG}
		
		% 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]{\DataA}
		\listplot[style=Result]{\DataB}
		
		% 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]{\DataA}
		\listplot[style=Result]{\DataB}
		\listplot[style=StdLineStyC]{\DataC}
		\listplot[style=StdLineStyD]{\DataD}
		\listplot[style=StdLineStyE]{\DataE}
		\listplot[style=StdLineStyF]{\DataF}
		\listplot[style=StdLineStyG]{\DataG}
		
		% 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]{\DataA}
		\listplot[style=Result, xStart=8, xEnd=13]{\DataB}
		
	\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]{\DataA}
		\listplot[style=Result]{\DataB}
		\listplot[style=StdLineStyC]{\DataC}
		\listplot[style=StdLineStyD]{\DataD}
		\listplot[style=StdLineStyE]{\DataE}
		\listplot[style=StdLineStyF]{\DataF}
		\listplot[style=StdLineStyG]{\DataG}
		
		% 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]{\DataA}
		\listplot[style=Result]{\DataB}
		
		% 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]{\DataA}
		\listplot[style=Result]{\DataB}
		\listplot[style=StdLineStyC]{\DataC}
		\listplot[style=StdLineStyD]{\DataD}
		\listplot[style=StdLineStyE]{\DataE}
		\listplot[style=StdLineStyF]{\DataF}
		\listplot[style=StdLineStyG]{\DataG}
		
		% 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]{\DataA}
		\listplot[style=Result, xStart=8, xEnd=13]{\DataB}
		
	\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} 