title: How to plot sine curve in Latex
body: <p>I have these curves that I'd like to express in Latex, I am new to Latex so I'm not sure how it could be done. I tried to follow a guide myself that looked similar but I don't know how to make it just like mine.</p>
  <pre><code>\begin {document}
  \noindent
  \begin{tikzpicture}
  \begin{axis}[
  minor tick num=3,
  axis y line=left,
  axis x line=middle,
  xlabel=$x$,ylabel=$\sin x$,
  yticklabels=\empty,
  ymax=2,
  ymin=-2,
  ]
  \addplot[smooth,blue,mark=none,
  domain=0:10,samples=40]
  {cos(deg(2*x))};
  \end{axis}
  \begin{axis}[
  minor tick num=3,
  xticklabels=\empty,
  yticklabels=\empty,
  axis y line=left,
  axis x line=middle,
  xlabel=$x$,ylabel=$\sin x$,
  ymax=2,
  ymin=-2,
  ]
  \addplot[smooth,blue,mark=none,dashed,
  domain=0:10,samples=40]
  {cos(deg(3*x))};
  \end{axis}
  
  
  \begin{axis}[
  minor tick num=3,
  xticklabels=\empty,
  yticklabels=\empty,
  ymax=1,
  ymin=-1,
  axis y line=left,
  axis x line=middle,
  xlabel=$x$,ylabel=$\sin x$,
  yticklabels={,-2},
  ]
  \addplot[smooth,blue,mark=none,dotted,
  domain=0:10,samples=40]
  {sin(deg(x))};
  \end{axis}
  \end{tikzpicture}
  \end{document}
  </code></pre>
  <p>The graph that I followed looked like this:</p>
  <p><a href="https://i.stack.imgur.com/dA5A3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dA5A3.png" alt="enter image description here" /></a></p>
  <p>The graph that I want to be written into Latex:</p>
  <p><a href="https://i.stack.imgur.com/N689P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N689P.png" alt="enter image description here" /></a></p>