为何我的角度没有得到线?
我刚刚复制了使用 tikz 标签角度,但出了点问题。
\documentclass{article}
\usepackage{tkz-euclide}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usetkzobj{all}
\usepackage{subcaption}
\usetkzobj{all}
\usetikzlibrary{calc,patterns,angles,quotes}
\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}[scale=1]
\begin{scope}[thick,font=\scriptsize]
\draw [->] (-.5,0) -- (5.5,0) node [above left] {$\operatorname{Re} z$};
\draw [->] (0,-.5) -- (0,4) node [below right] {$\operatorname{Im} z$};
\end{scope}
\coordinate (o) at (0,0);
\coordinate (z) at (4,3);
\coordinate (zx) at (4,0);
\coordinate (zy) at (0,3);
\draw (0,0) -- node[above] {$r$} (z) node [right] {$z$};
\draw [dotted] (z) -- (zx) node [below] {$x$};
\draw [dotted] (z) -- (zy) node [left] {$y$};
\draw pic["$\theta$", ->, angle eccentricity=1.2,angle radius = 1cm] {angle = zx--o--z};
\end{tikzpicture}
\caption{$z$ in the complex plane.}
\label{fig:complex-plane-1}
\end{figure}
\end{document}
答案1
你使用时的语法pic
是错误的。你得到
使用时
\documentclass{article}
\usepackage{tkz-euclide}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usetkzobj{all}
\usepackage{subcaption}
\usetkzobj{all}
\usetikzlibrary{calc,patterns,angles,quotes}
\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}[scale=1]
\begin{scope}[thick,font=\scriptsize]
\draw [->] (-.5,0) -- (5.5,0) node [above left] {$\operatorname{Re} z$};
\draw [->] (0,-.5) -- (0,4) node [below right] {$\operatorname{Im} z$};
\end{scope}
\coordinate (o) at (0,0);
\coordinate (z) at (4,3);
\coordinate (zx) at (4,0);
\coordinate (zy) at (0,3);
\draw (0,0) -- node[above] {$r$} (z) node [right] {$z$};
\draw [dotted] (z) -- (zx) node [below] {$x$};
\draw [dotted] (z) -- (zy) node [left] {$y$};
\pic[draw, "$\theta$", ->, angle eccentricity=0.8,angle radius = 1.5cm] {angle = zx--o--z};
\end{tikzpicture}
\caption{$z$ in the complex plane.}
\label{fig:complex-plane-1}
\end{figure}
\end{document}