以下是 MWE:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[xmin = 0,
xmax = 1.5,
ymin = 0,
ymax = 6.2831853072,
ytick={0,0.7853981634,1.5707963268,2.3561944902,3.1415926536,3.926990817,4.7123889804,5.4977871438,6.2831853073}, yticklabels={$0$,$\frac{\pi}{4}$,$\frac{\pi}{2}$,$\frac{3\pi}{4}$,$\pi$,$\frac{5\pi}{4}$,$\frac{3\pi}{2}$,$\frac{7\pi}{4}$,$2\pi$},
grid=major,
xlabel=$\gamma$,
ylabel=$\phi$]
\addplot +[no markers,
raw gnuplot,
thick,
blue,
] gnuplot {
set contour base;
set cntrparam levels discrete 0.003;
unset surface;
set view map;
set isosamples 500;
splot x*cos(y)-1;
};
\addplot +[no markers,
raw gnuplot,
thick,
blue,
] gnuplot {
set contour base;
set cntrparam levels discrete 0.003;
unset surface;
set view map;
set isosamples 500;
splot sin(y);
};
\end{axis}
\end{tikzpicture}
\end{document}
它的输出很好:
这是设置后的输出clip = false
。
\begin{tikzpicture}
\begin{axis}[clip = false, xmin = 0,
xmax = 1.5,
ymin = 0, ...
满是蓝线的一页!如果你仔细看底部,你就会看到长长的页码。
为什么会发生这种情况?
答案1
来自 Jake 的评论的 CW,被 OP 确认为解决方案(并且已清理):
中的x
和的默认域为,如果要设置,则需要在命令中限制域:。y
gnuplot
-10:10
clip=false
\addplot
splot [0:1.5] [0:2*pi] x*cos(y)-1;