Skip to main content

The groupplots library of pgfplots, which is made to facilitate placing multiple axes in a grid, with common settings.

The groupplots library of the pgfplots package defines a new environment groupplot for use within a tikzpicture environment. The number of rows and columns are defined by group style={group size=<columns> by <rows>}. To initiate a subplot, use \nextgroupplot, which also allows one to set individual options for each axis, e.g. \nextgroupplot[title=...].

A simple example:



  group style={
    group size=2 by 3,
    x descriptions at=edge bottom, % tick/axis labels only on bottom
    y descriptions at=edge left, % tick/axis labels only on left
    horizontal sep=5pt, % horizontal distance between axes
    vertical sep=5pt, % vertical distance between axes
  % the following settings will apply to all the subplots

% first row, first column
\addplot {rnd};

% first row, second column
\addplot {rnd};

% second row, first column
\addplot {rnd};

% etx
\addplot {rnd};

\addplot {rnd};

\addplot {rnd};


enter image description here