# fillbetween from pgfplots does not work inside groupplots [closed]

MWE:

\documentclass{article}

\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepgfplotslibrary{groupplots}
\usepgfplotslibrary{fillbetween}

\usepackage{filecontents}

\begin{filecontents}{testdata.dat}
t lineLow lineHigh lineMedian
0 1 1 1
1 2 2 2
2 2 3 2.5
3 2 4 3
4 2 4 3
\end{filecontents}

\begin{document}

\begin{tikzpicture}
\begin{groupplot}
[
group style={group size=1 by 2, vertical sep=30pt}
]
\nextgroupplot
[
]

\end{groupplot}
\end{tikzpicture}

\begin{tikzpicture}
\begin{axis}
\end{axis}
\end{tikzpicture}

\end{document}


Problem: the fill area between the lines does not work inside groupplots. Is there a workaround for this?

Versions:

• pgf 3.0.0
• pgfplots 1.11

## closed as off-topic by Stefan Pinnow, Henri Menke, Martin Schröder, user13907, Sean AllredAug 14 '16 at 20:34

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Any chances to get this working? I'd really like to use it in my paper. – remus Oct 29 '14 at 13:25
• I'm voting to close this question because it is solved by updating PGFPlots to v1.14 – Stefan Pinnow Aug 14 '16 at 19:47

This is a bug in pgfplots 1.11. I downgraded to pgfplots 1.10 and everything looks as expected.

• The bug appears to be related to layered graphics, more specifically to cell picture=false. If you add set layers,cell picture=true, to your groupplot, it will also work for 1.11 . I will look into it. – Christian Feuersänger Nov 14 '14 at 15:50
• @ChristianFeuersänger Are there any updates on this? I just came across this same bug and I'm using pgfplots 1.12. Good that I found this comment of yours for a workaround! – jja May 12 '15 at 18:18
• No, this is still current at the time of this writing (latest stable 1.12.1). – Christian Feuersänger May 13 '15 at 18:37

The bug has been fixed in pgfplots version 1.13. With 1.13, the example compiles as expected without any changes:

At the time of this writing (January 9, 2016), version 1.13 is quite fresh and might need a couple of days until it arrives in all TeX package managers.

• Unfortunately, fillbetween still does not seem to work correctly in all sub-plots inside a group plot on my setup even with PGFPlots 1.13. For instance, this LaTeX file results in this PDF file. Could you please take a look at it? – ib. Jan 10 '16 at 8:03
• Another appearance of the same issue: tex.stackexchange.com/q/287424 – LaRiFaRi Jan 13 '16 at 13:31
• @ib I have analyzed your issue and found that it is caused by a different, unrelated root cause. Apparently, two axes in the same figure suffer from the fact that the first fill between installs a clip path -- and the second is clipped away. This is clearly a bug and I will take care of it. A workaround is to add clip=false to the groupplot environment. – Christian Feuersänger Jan 13 '16 at 19:12
• @LaRiFaRi my last comment (and workaround) applies to your example as well. – Christian Feuersänger Jan 13 '16 at 19:15
• – Christian Feuersänger Jan 13 '16 at 19:20