Помогите нарисовать в LaTeX график тангенса (несколько ветвей) с помощью пакета Tikz. Прилагаю код.
\begin{tikzpicture}[line cap=round,line join=round,scale=0.7]
\draw[->,color=black] (-10,0) — (10,0) node[anchor=north] {\scriptsize $x$};
\foreach \x in {} \draw[shift={(\x,0)},color=black,fill=white] (0pt,2pt) — (0pt,-2pt) node[below] {\scriptsize $\x$};
\draw[->,color=black] (0,-7) — (0,7) node[anchor=east] {\scriptsize $y$};
\foreach \y in {} \draw[shift={(0,\y)},color=black] (2pt,0pt) — (-2pt,0pt) node[left] {\scriptsize $\y$};
\draw[dashed] plot (pi/2,-6.5) — (pi/2,6.5);
\draw[dashed] plot (-pi/2,-6.5) — (-pi/2,6.5);
\draw[dashed] plot (3*pi/2,-6.5) — (3*pi/2,6.5);
\draw[dashed] plot (-3*pi/2,-6.5) — (-3*pi/2,6.5);
\draw[dashed] plot (5*pi/2,-6.5) — (5*pi/2,6.5);
\draw[dashed] plot (-5*pi/2,-6.59) — (-5*pi/2,6.5);
\clip(-11,-6) rectangle (11,6);
\draw[color=red,samples=500,domain=-1.5:1.5] plot(\x,{tan(\x)});
\end{tikzpicture}