tikz
在使用和处理图片时tkz-euclide
,我发现将表示角度的方向弧的颜色更改为与形成该角度的两个线段相同的颜色不会影响箭头的颜色。但是,当用不同的颜色为弧着色时,一切就完美了。
\documentclass[border=3mm]{standalone}
\usepackage{pgfplots}
\usepackage{tkz-euclide}
\pgfplotsset{compat=1.12}
\usetkzobj{all}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}
% Defining points
\tkzDefPoint(0,0){O}
\tkzDefPoint(3,0){P}
\tkzDefPoint(3,2){M}
\draw[magenta] (0,0) node[anchor=north east] {$O$};
% Drawing the segments
\draw[color=magenta,->,>=stealth] (0,0) -- (3,2) node[above right] {$M$};
\draw[color=magenta,->,>=stealth] (0,0) -- (3,0) node[below] at (3,0) {$P$};
% Marking the angle
\tkzMarkAngle[size=1.5, draw=magenta, arrows=->,>=stealth](P,O,M)
\end{tikzpicture}
\end{document}
如何纠正这个问题?
答案1
对于相同颜色的圆弧和它的箭头,您需要更改颜色的定义,如下tkzMarkAngle
所示:
\tkzMarkAngle[size=1.5,color=magenta, arrows=-stealth](P,O,M)
通过此修改,您可以获得:
对上图稍作修改(简化)的 MWE 如下:
\documentclass[border=3mm]{standalone}
\usepackage{pgfplots}
\usepackage{tkz-euclide}
\pgfplotsset{compat=1.12}
\usetkzobj{all}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}[>=stealth]
% Defining points
\tkzDefPoint(0,0){O}
\tkzDefPoint(3,0){P}
\tkzDefPoint(3,2){M}
% Drawing the segments
\draw[magenta,->] (0,0) node[anchor=north east] {$O$}
-- (3,2) node[above right] {$M$};
\draw[magenta,->] (0,0) -- (3,0) node[below] {$P$};
% Marking the angle
\tkzMarkAngle[size=1.5,color=magenta, arrows=->](P,O,M)
\end{tikzpicture}
\end{document}