![从 pgfplots 轮廓 gnuplot 中的表中指定级别](https://linux22.com/image/320510/%E4%BB%8E%20pgfplots%20%E8%BD%AE%E5%BB%93%20gnuplot%20%E4%B8%AD%E7%9A%84%E8%A1%A8%E4%B8%AD%E6%8C%87%E5%AE%9A%E7%BA%A7%E5%88%AB.png)
是否可以在以下代码中从表中指定轮廓级别?
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
title={$x \exp(-x^2-y^2)$},
domain=-2:2,
enlargelimits,
view={0}{90}]
\addplot3[gnuplot={levels={-0.1,-0.2,-0.6}},thick] {exp(-x^2-y^2)*x};
\end{axis}
\end{tikzpicture}
\end{document}
答案1
你必须使用contour gnuplot={levels={-0.1,-0.2,-0.4}}
。
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
title={$x \exp(-x^2-y^2)$},
domain=-2:2,
enlargelimits,
view={0}{90}]
\addplot3[contour gnuplot={levels={-0.1,-0.2,-0.4}},thick] {exp(-x^2-y^2)*x};
\end{axis}
\end{tikzpicture}
\end{document}
-0.6
太小,无法显示。