14

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.

EDIT

This is the code I try to compile.

\documentclass{minimal}
\usepackage{pgfplots}
\usepackage{tikz}
\usepgfplotslibrary{groupplots}

\begin{document}
\begin{tikzpicture}

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

\end{tikzpicture}
\end{document}

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)
16

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

\usepgflibrary{pgfplots.groupplots}
% or
\usepgfplotslibrary{groupplots}

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.

4
  • 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
0

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:

\usepgfplotslibrary{groupplot}
\usepgfplotslibrary{groupplots}

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

\usetikzlibrary{pgfplots.groupplots}

After that it worked fine.

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.