您需要告诉 PGFPlots 仅绘制一次曲线samples y=1
:
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\begin{document}\begin{tikzpicture}
\begin{axis}
\addplot3 [variable=t, domain=-1.5:1.5, samples y=1] ({t},{0},{20-t^2});
\end{axis}
\end{tikzpicture}
\end{document}