# Create 2x2 groupplot with +1 plot to the side?

I want to create a 2x2 + 1 plot like...

---------------------------|
| Plot 1 | Plot 2 |        |
------------------- Plot 5 |
| Plot 3 | Plot 4 |        |
---------------------------|


How can I achieve that? With the pgfplots package?

• Can you post a dummy example for the plots? It's really not fun to write up 5 sub plots from scratch. – percusse Jun 4 '13 at 21:17
• Yeah for some reason I was only thinking in groupplots but subfigure is a much better solution since they indeed don't have the same caption. – WG- Jun 4 '13 at 21:23

Here's something to get you started

I have used the subcaption package which provides, among other things, the subfigure environment. You can think of this as a minipage- it takes all of the same mandatory and optional arguments.

Adjust the widths as you like :)

% arara: pdflatex
% !arara: indent: {overwrite: yes}
\documentclass{article}
\usepackage{pgfplots}
\usepackage{subcaption}

\pgfplotsset{
every axis/.append style={
scale only axis,
width=\textwidth,
}
}

\begin{document}

\begin{figure}%
\begin{minipage}{.5\textwidth}
\centering
\begin{subfigure}{.4\textwidth}
\begin{tikzpicture}
\begin{axis}
\end{axis}
\end{tikzpicture}
\caption{}
\end{subfigure}%
\hfill
\begin{subfigure}{.4\textwidth}
\centering
\begin{tikzpicture}
\begin{axis}
\end{axis}
\end{tikzpicture}
\caption{}
\end{subfigure}%
\\
\begin{subfigure}{.4\textwidth}
\begin{tikzpicture}
\begin{axis}
\end{axis}
\end{tikzpicture}
\caption{}
\end{subfigure}%
\hfill
\begin{subfigure}{.4\textwidth}
\begin{tikzpicture}
\begin{axis}
\end{axis}
\end{tikzpicture}
\caption{}
\end{subfigure}
\end{minipage}%
\begin{minipage}{.5\textwidth}
\centering
\begin{subfigure}{.9\textwidth}
\begin{tikzpicture}
\begin{axis}