答案1
欢迎!这将是圆周率日的一个很棒的问题!您只需要在极坐标中绘制一个半径等于角度的参数图,trig format=rad
就可以在这里使用,然后绘制参数在(\t:\t)
哪里。\t
\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}[trig format=rad,scale=2/pi]
\draw[-stealth] (-2.5*pi,0) -- (2.5*pi,0);
\draw[-stealth] (0,-1.8*pi,0) -- (0,3*pi);
\draw foreach \X in {-2,-1,...,2}
{(\X*pi,0.2) -- (\X*pi,-0.2) node[below right] {\ifnum\X>0\relax $\ifnum\X>1
\X\fi\pi$\fi}}
foreach \X in {-1,...,2}
{(0.2,\X*pi) -- (-0.2,\X*pi) node[left]{$\ifnum\X=-1 -\pi \else
\ifnum\X=1 \pi\else \unless\ifnum\X=0 \X\pi\fi \fi\fi$}};
\draw[very thick] plot[variable=\t,domain=-2.4*pi:2.4*pi,smooth,samples=301] (\t:\t);
\end{tikzpicture}
\end{document}