3

The MWE puts plots in a 2x2 matrix:

x x

x -

I'd like to place the plots differently:

x -

x x

MWE:

\documentclass{standalone}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{groupplots}

\begin{document}
    \begin{tikzpicture} 
        \begin{groupplot}[group style={group size=2 by 2, horizontal sep=4em}]
            \nextgroupplot[xlabel=$x$, ylabel={$f(x) = x^2 - x +4$}]
                \addplot {x^2 - x +4};

            \nextgroupplot[xlabel=$x$, ylabel={$f(x) = x^2 - x +4$}]
                \addplot {x^2 - x +4};

            \nextgroupplot[xlabel=$x$, ylabel={$f(x) = x^2 - x +4$}]
                \addplot {x^2 - x +4};
        \end{groupplot}     
    \end{tikzpicture}
\end{document}
3

Add \nextgroupplot[group/empty plot] after the first groupplot.

enter image description here

\documentclass{standalone}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{groupplots}

\begin{document}
    \begin{tikzpicture} 
        \begin{groupplot}[group style={group size=2 by 2, horizontal sep=4em}]
            \nextgroupplot[xlabel=$x$, ylabel={$f(x) = x^2 - x +4$}]
                \addplot {x^2 - x +4};

            \nextgroupplot[group/empty plot]

            \nextgroupplot[xlabel=$x$, ylabel={$f(x) = x^2 - x +4$}]
                \addplot {x^2 - x +4};

            \nextgroupplot[xlabel=$x$, ylabel={$f(x) = x^2 - x +4$}]
                \addplot {x^2 - x +4};
        \end{groupplot}     
    \end{tikzpicture}
\end{document}
| improve this answer | |
  • May also required axis background/.style={fill=none} if the user defined a common background. – anderstood Oct 21 '16 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.