答案1
我删除了轴上的一个零
\documentclass[border = 5pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[-latex, thick, black] (0, 0) node[left]{$0$} -- (2 * pi, 0) node[right]{$t$};
\draw[-latex, thick, black] (0, -2) -- (0, 2) node[left]{$E$};
\draw[thick, black] plot[variable = \x, domain = 0:2*pi, smooth]
({\x}, {2 * (1 - exp(-0.6 * pow(\x, 2))) * (1 - exp(-0.6 * pow(\x - 2 * pi, 2))) * sin(\x r)});
\end{tikzpicture}
\end{document}
答案2
可以使用装饰snake
来轻松绘制它。
\documentclass[tikz,border = 5pt]{standalone}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}[>=latex, thick]
\draw[->] (0, 0) node[left]{0} -- (2.05*pi, 0) node[right]{$t$};
\draw[->] (0,-2) -- (0, 2) node[left]{$E$};
\draw [decorate,decoration={snake,amplitude=1.7cm,segment length=5.4cm}] (0,0) -- (2*pi,0);
\end{tikzpicture}
\end{document}