Pgfplots 没有绘制所需的参数曲线

Pgfplots 没有绘制所需的参数曲线

我正在尝试使用 pgf 绘制摆线。在不同的查看矩形中,图形显示不同:

\documentclass{standalone}
\usepackage{tikz,pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot[red] ({x-sin(x)},{1-cos(x)});
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
axis lines=center,
xmin=-0.2,xmax=2.2,
ymin=-0.2,ymax=2.2]
\addplot[red] ({x-sin(x)},{1-cos(x)});
\end{axis}
\end{tikzpicture}
\end{document}

在此处输入图片描述

我想要的是这样的:

在此处输入图片描述

谢谢!

相关内容