在以下示例中,轴线应为yellow
和ultra 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}