Pgfplots:填充让轴选项被忽略

Pgfplots:填充让轴选项被忽略

在以下示例中,轴线应为yellowultra thick,但使用fill between指令可忽略轴选项:

\documentclass{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{fillbetween}
\pgfplotsset{compat=newest}

\begin{document}
\begin{tikzpicture}
\begin{axis} [
  yellow, ultra thick   % <--- neglected
]
\addplot+ [name path=sup] coordinates {(0,0) (1,1)};
\addplot+ [name path=inf] coordinates{(0,0) (1,0)};
\addplot [blue!50] fill between [of=sup and inf]; % <--- this is the problem
\end{axis}
\end{tikzpicture}
\end{document}

相关内容