I once already asked a very similar question; How can I add space between two separate plots, using pgfplots?. But this is some what different.
I have the following code;
\documentclass{standalone}
\usepackage{graphics}
\usepackage{tikz,pgfplots}
\pgfplotsset{compat=1.6}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
width=3cm,
height=3cm,
scale only axis,
every x tick label/.append style={font=\scriptsize\color{gray!80!black}},
xmin=0, xmax=20000,
xlabel={$t$},
xmajorgrids,
xminorgrids,
every y tick label/.append style={font=\scriptsize\color{gray!80!black}},
ymin=0.0004, ymax=0.0012,
ylabel={$\phi_{\mathrm{i}}(t)$},
ymajorgrids,
yminorgrids,
name=plot1]
\end{axis}
\begin{axis}[%
width=3cm,
height=3cm,
scale only axis,
every x tick label/.append style={font=\scriptsize\color{gray!80!black}},
xmin=0, xmax=20000,
xlabel={$t$},
xmajorgrids,
xminorgrids,
every y tick label/.append style={font=\scriptsize\color{gray!80!black}},
ymin=0.2, ymax=1.2,
ylabel={$h(t)$},
ymajorgrids,
yminorgrids,
name=plot2,
at=(plot1.right of north east), anchor=left of north west]
\end{axis}
\begin{axis}[%
width=3cm,
height=3cm,
scale only axis,
every x tick label/.append style={font=\scriptsize\color{gray!80!black}},
xmin=0, xmax=20000,
xlabel={$t$},
xmajorgrids,
xminorgrids,
every y tick label/.append style={font=\scriptsize\color{gray!80!black}},
ymin=0.0004, ymax=0.0012,
ylabel={$\phi_{\mathrm{o}}(t)$},
ymajorgrids,
yminorgrids,
name=plot4,
at=(plot1.below south west), anchor=above north west]
\end{axis}
\begin{axis}[%
width=3cm,
height=3cm,
scale only axis,
every x tick label/.append style={font=\scriptsize\color{gray!80!black}},
xmin=0, xmax=20000,
xlabel={$t$},
xmajorgrids,
xminorgrids,
every y tick label/.append style={font=\scriptsize\color{gray!80!black}},
ymin=2000, ymax=12000,
ylabel={$p_{\mathrm{i}}(t)$},
ymajorgrids,
yminorgrids,
name=plot5,
at=(plot4.right of north east), anchor=left of north west]
\end{axis}
\end{tikzpicture}
\end{document}
This creates the following plot:

I think there is to few vertical/horizontal spacing between the plots. I want to increase this. Currently I use x- yshift, this gives the following result:
\documentclass{standalone}
\usepackage{graphics}
\usepackage{tikz,pgfplots}
\pgfplotsset{compat=1.6}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
width=3cm,
height=3cm,
scale only axis,
every x tick label/.append style={font=\scriptsize\color{gray!80!black}},
xmin=0, xmax=20000,
xlabel={$t$},
xmajorgrids,
xminorgrids,
every y tick label/.append style={font=\scriptsize\color{gray!80!black}},
ymin=0.0004, ymax=0.0012,
ylabel={$\phi_{\mathrm{i}}(t)$},
ymajorgrids,
yminorgrids,
name=plot1]
\end{axis}
\begin{axis}[%
xshift=1cm,
width=3cm,
height=3cm,
scale only axis,
every x tick label/.append style={font=\scriptsize\color{gray!80!black}},
xmin=0, xmax=20000,
xlabel={$t$},
xmajorgrids,
xminorgrids,
every y tick label/.append style={font=\scriptsize\color{gray!80!black}},
ymin=0.2, ymax=1.2,
ylabel={$h(t)$},
ymajorgrids,
yminorgrids,
name=plot2,
at=(plot1.right of north east), anchor=left of north west]
\end{axis}
\begin{axis}[%
yshift=-1cm,
width=3cm,
height=3cm,
scale only axis,
every x tick label/.append style={font=\scriptsize\color{gray!80!black}},
xmin=0, xmax=20000,
xlabel={$t$},
xmajorgrids,
xminorgrids,
every y tick label/.append style={font=\scriptsize\color{gray!80!black}},
ymin=0.0004, ymax=0.0012,
ylabel={$\phi_{\mathrm{o}}(t)$},
ymajorgrids,
yminorgrids,
name=plot4,
at=(plot1.below south west), anchor=above north west]
\end{axis}
\begin{axis}[%
xshift=1cm,
width=3cm,
height=3cm,
scale only axis,
every x tick label/.append style={font=\scriptsize\color{gray!80!black}},
xmin=0, xmax=20000,
xlabel={$t$},
xmajorgrids,
xminorgrids,
every y tick label/.append style={font=\scriptsize\color{gray!80!black}},
ymin=2000, ymax=12000,
ylabel={$p_{\mathrm{i}}(t)$},
ymajorgrids,
yminorgrids,
name=plot5,
at=(plot4.right of north east), anchor=left of north west]
\end{axis}
\end{tikzpicture}
\end{document}

I want to know if there is a more consistent manner to do this.


xshiftandyshift. – WG- Dec 14 '12 at 12:22horizontal sepapplies to all plots in thegroupplots. Can you set different distances between individual plots? Say, if you have 3 plots in a row, then set 3cm and 5cm distance between 1-2 and 2-3 plots, respectively. – Gagik Mar 30 '20 at 02:45