artisticat1 / obsidian-tikzjax

Render LaTeX and TikZ diagrams in your notes
MIT License
454 stars 27 forks source link

tan not working #31

Closed AriesOdyssey closed 1 year ago

AriesOdyssey commented 1 year ago

Hi I have this code right now:

\begin{document}
  \begin{tikzpicture}[domain=-pi:pi]
    \draw[very thin,color=gray] (-pi,-pi) grid (pi,pi);
    \draw[->] (-0.2,0) -- (pi+0.2,0) node[right] {$x$};
    \draw[->] (0,-1.2) -- (0,pi+0.2) node[above] {$f(x)$};
    \draw[color=red]    plot (\x,{tan(\x r)})      node[right] {$f(x) =\tan x$};
    \draw[color=blue]   plot ({tan(\x r)},\x)    node[right] {$f(x) = \arctan x$};
  \end{tikzpicture}
\end{document}

with result image

if I remove the radiant sign "r" I get

image

which is not what I want.

Could u tell me what I am doing wrong or is the plugin not working