I use a "parent" tikzpicture to realize a more flexible positioning of pgfplots than what is possible with groupplots i.e. I put the pgfplots in nodes as in the following MWE:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usetikzlibrary{positioning,calc}
\pgfplotsset{every axis/.append style={width=5cm}}
%\tikzstyle{every picture}+=[remember picture,overlay]
\begin{document}
\begin{tikzpicture}
\node (TL) {% Plot 1
\begin{tikzpicture}
\begin{axis}
\addplot coordinates { (-5,100) (115,10) };
\coordinate (C) at (axis cs: 0,0);
\end{axis}
\end{tikzpicture}
};
\node[right=1cm of TL] (TR) {% Plot 2
\begin{tikzpicture}
\begin{axis}
\addplot coordinates { (-5,-120) (15,100) };
\coordinate (D) at (axis cs: 0,0);
\end{axis}
\end{tikzpicture}
};
\node[anchor=north] (B) at ($(TL.south)!0.5!(TR.south)$) {% Plot 3
\begin{tikzpicture}
\begin{axis}
\addplot coordinates { (-5,100) (115,100) };
\end{axis}
\end{tikzpicture}
};
\end{tikzpicture}
\end{document}
Is there a way to connect the coordinates (C)
and (D)
with a line?
I tried the remember picture, overlay
option, but this did not work and the position of the figure was on the top left corner of the page.
groupplots
library of pgfplots for this type of applications: at the end of the day, setting options properly you can customize more or less as you want the layout. – Claudio Fiandrino Jul 13 '16 at 6:55