I am using PGFPlots version 1.14 and PGF version 3.0.1a and am having a weird effect with fill between. The coloring for fill between is appearing in the subsequent graph, not in the graph it was defined in.
\documentclass{article}
\usepackage{pgfplots}
\usepgfplotslibrary{fillbetween, polar}
\begin{document}
\begin{center}
\begin{tikzpicture}
\begin{polaraxis}[
xtick=\empty,
ytick=\empty,
hide axis,
]
\addplot[domain=0:360, smooth, blue, name path=rose]{cos(2*x)};
\addplot[domain=0:360, smooth, red, name path = circle]{.5};
\addplot[yellow] fill between[of=circle and rose];
\end{polaraxis}
\end{tikzpicture}
\end{center}
\begin{center}
\begin{tikzpicture}
\begin{axis}
\addplot[green] fill between[of=NoPathA and NoPathB];
\end{axis}
\end{tikzpicture}
\end{center}
\end{document}
with result
Why isn't the fill happening in the original picture, and why is the fill showing up in the second picture, even when I put in dummy name paths?
polaraxis
. Although the plot would be different, inaxis
environment everything seems O.K. – Sina Ahmadi Sep 21 '17 at 19:14