TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to reproduce some examples from the pgfplot documentation, but \usepgflibrary{groupplots} does not succeed, while shapes does. In the documentation I can't find a hint if this feature is too new for my distribution, I have texlive-full in version 2009-15 ... is this too old?

The error message is pretty clear:

! I can't find file `pgflibrarygroupplots.code.tex'.
<argument> ...input pgflibrary\pgf@temp .code.tex 
                                              \catcode `\@ =\csname pgf@...
l.5 \usepgflibrary{groupplots}

But as I'm working collaborative with colleagues, installing a more recent version is not a solution.


This is the code I try to compile.



group style={
    group name=my plots,
    group size=2 by 2,
    xlabels at=edge bottom,
    ylabels at=edge left
},height=4cm, width=4cm]
\addplot coordinates {(0,0) (1,1) (2,2)};
\addplot coordinates {(0,2) (1,1) (2,0)};
\addplot coordinates {(0,2) (1,1) (2,1)};
\addplot coordinates {(0,2) (1,1) (1,0)};


Here's what I get:

! I can't find file `pgflibrarypgfplots.groupplots.code.tex'.
<argument> ...input pgflibrary\pgf@temp .code.tex 
                                              \catcode `\@ =\csname pgf@...
l.4 \usepgflibrary{pgfplots.groupplots}

(Press Enter to retry, or Control-D to exit)
share|improve this question
up vote 11 down vote accepted

The problem is simply that groupplots is a library from the pgfplots package. Thus it needs to be used as:

% or

For easy reference in the answer, the groupplots package was added to the pgfplots tree around October 2009. The 1.4 version was released on: 7-14-2010. I am not entirely sure about the first release version where groupplots was used.

share|improve this answer
Thank you for the hint (corrected code above), but does not work. usepgfplotslibrary results in an Undefined control sequence while the other method tells me I can't find file 'pgflibrarypgfplots.groupplots.code.tex' ... seems to be a version issue. – wal-o-mat Jul 9 '12 at 11:32
@wal-o-mat Try and see if the groupplots file exists in the directory:tex/generic/pgfplots/libs. It is named with groupplots. If it does not exists you dont have it available. Then you need to install the version from sourceforge.net – zeroth Jul 9 '12 at 11:44
For reference it was added to the pgfplots tree around october 2009. So you may have an outdated version. :( – zeroth Jul 9 '12 at 11:45
Yes, it's not there. It's a pity, but fixing it on my machine will render the repo uncompileable for the others. So I manually place my plots. Thank you for the assistance! – wal-o-mat Jul 9 '12 at 11:55

I had a similar issue with MikTeX 2.9 with pgfplots installed in 2013 trying to reproduce the same example from the gallery.

In tex/generic/pgfplots/libs/ I had a file called tikzlibrarypgfplots.groupplots.code.tex, not pgflibrarypgfplots.groupplots.code.tex.

Hence I had to change the imports from:


... in the original example to just ...


After that it worked fine.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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