各位,请考虑以下 MWE:
例如,如何填充blue!20
区域?我的意思是填充应该像等高线图一样,颜色由某些函数(如 x^2)决定。point meta
point meta=x^2
我尝试了很多方法,但都没有用。你有什么想法吗?
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{fillbetween}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[domain=0:1]
\addplot+ [name path=A] {sin(360*x)};
\addplot+ [name path=B] {cos(360*x)};
\addplot [blue!20] fill between [of=A and B];
%% how to fill this area by point meta e.g., point meta= x^2
\end{axis}
\end{tikzpicture}
\end{document}
提前致谢。