我正在嘗試繪製函數 f(x)= sin ^-1(x)。我剛剛收到錯誤訊息“缺少數字,視為零。...samples=100]plot (\x,{(sin)^(-1)(deg(\x))})”..我無法弄清楚問題出在哪裡。
\documentclass[border = 12]{standalone}
\usepackage{ifthen}
\usepackage{makecell,amsmath}
\usepackage{pgfmath}
\usepackage{standalone}
\usepackage{stix}
\usepackage{tkz-euclide}
\usepackage{tikz}
\usetkzobj{all}
\usetikzlibrary{angles}
\usetikzlibrary{automata}
\usetikzlibrary{arrows}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{intersections}
\usetikzlibrary{patterns}
\usetikzlibrary{positioning}
\usetikzlibrary{quotes}
\usetikzlibrary{shapes}
\usetikzlibrary{shapes.callouts}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}
\begin{scope}[thick,scale=2,>={Latex}, font=\fontsize{11.25}{11.25}\selectfont]
\pgfgettransformentries{\mya}{\myb}{\myc}{\myd}{\mys}{\myt}
\pgfmathsetmacro{\preserve}{1/\mya}
\foreach \x/\m in {{-pi/2}/-\frac{\pi}{2},{-pi/4}/-\frac{\pi}{4},{pi/4}/\frac{\pi}{4},{pi/2}/\frac{\pi}{2}}
\draw (\x,3pt*\preserve)--(\x,-3pt*\preserve) node [below] {$\m$};
\foreach \y in {-1,1}
\draw (3pt*\preserve,\y)--(-3pt*\preserve,\y) node [left] {$\y$};
\draw [ultra thick, domain={-pi/2*1.08}:{pi/2*1.08},samples=100, <->] plot (\x,{sin(deg(\x))});
\draw [ultra thick, domain={-pi/4}:{pi/4},samples=100] plot (\x,{(sin)^(-1)(deg(\x))});
\node [Bluey!160!] at (1.15,0.4) {$f(x)=\sin x$};
\draw[<->](0,-1.5)--(0,1.5)node[above]{$y$};
\draw[<->](-2,0)--(2,0)node[right]{$x$};
\end{scope}
\end{tikzpicture}
\end{document}