I recently (foolishly) updated all my TeXlive packages, including pgfplots (from 1.10 to 1.11).

I now have an issue with the groupplots and fillbetween libraries, where using the fillbetween library 1) doesn't work and 2) breaks the alignment of the group plots.




\begin{tikzpicture}[trim axis group left]

group style={%
group size=1 by 2,
vertical sep=0pt,
x descriptions at=edge bottom},
scale only axis,
/pgf/number format/use comma,
xlabel={Y [mm]},
\nextgroupplot[height=2.49166666667cm,ylabel={Z [mm]},y label style={at={(axis description cs:-0.08,.5)}},ymin=-0.59,ymax=0.19]

\nextgroupplot[ylabel={$\kappa$ [mm$^{-1}$]},y label style={at={(axis description cs:-0.08,.5)}},ymin=-12,ymax=8,height=6cm]
\addplot[color=green,solid,name path=mittemin] coordinates {(-1.8,-10)  (1.8,-10)};
\addplot[color=green,solid,name path=mittemax] coordinates {(-1.8,-1.5) (1.8,-1.5)};
\addplot[color=green,solid,name path=randmin]  coordinates {(-1.8,0.9)  (1.8,0.9)};
\addplot[color=green,solid,name path=randmax]  coordinates {(-1.8,6.5)  (1.8,6.5)};

\addplot[green!20] fill between[of=mittemin and mittemax];
\addplot[green!20] fill between[of=randmin  and randmax];


This yields the following result (no filling, broken alignment):

broken alignment

After commenting out the (non-functioning) fill between statements, the alignment is right again:

correct alignment

This hasn't occurred with pgfplots 1.10. Setting compat=1.10 does not change the output. As far as I can work out, something was changed in the fillbetween library for 1.11, is this a bug or am I missing something?

EDIT: I downgraded to pgfplots 1.10, which fixed the problem (for anyone with the same issue: uninstalled the old version via tlmgr, downloaded it here, unzipped it to TEXMFLOCAL and ran mktexlsr). The issue therefore seems to be related to pgfplots only, I am going to ask Christian Feuersänger about it.

  • 1
    The alignment in 1.11 is fixed if you add anchor=south to the groupplot options. Filling requires some more investigation indeed. – percusse Sep 15 '14 at 9:41
  • Any news on the filling problem? I have a similar issue. – remus Oct 29 '14 at 13:36
  • I've run into this problem with groupplot and fillbetween a couple of times, when I try to place an axis with fillbetween next to a groupplot, My usual fix is to place a "main anchor node" first thing in my tikzpicture, and then anchor the groupplot to this node. I never need to align my other axes to my anchor node - as long as I do this with the groupplot, it seems to fix it. – kadrach May 4 '15 at 3:38
  • 4
    I'm voting to close this question as off-topic because it is about a bug in pgfplots that is fixed in version 1.13. – Torbjørn T. Jan 22 '16 at 22:06
  • 1
    I still do have that issue in 1.13... – Theo Jan 25 '16 at 18:27