我想画一个带有文字和箭头的圆圈,就像这张图片上的那样。
但我不知道如何使用 tkz-euclide 来做到这一点。
我已经做过类似的事情
\documentclass[10pt]{standalone}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){O}
\tkzDefPoint(150:2){A}
\tkzDefPoint(330:2){B}
\tkzDefPoint(20:2){C}
\tkzDefPoint(268:2){D}
\tkzDefMidPoint(A,C) \tkzGetPoint{e}
\tkzDefMidPoint(B,D) \tkzGetPoint{f}
\tkzDrawSegments(A,B O,D O,C B,D O,e O,f)
\tkzMarkRightAngles(O,e,A O,f,D)
\tkzDrawSector[fill=gray!20](O,B)(C)
\tkzDrawCircle[R](O,2cm)
\filldraw[fill=gray!10]
(150:2cm)
-- (20:2cm)
arc[start angle=20, end angle=150, radius=2cm]
-- cycle;
\end{tikzpicture}
\end{document}
我如何添加带有指向圆圈上物体的箭头的文字?
答案1
类似这样的操作——删除文本周围的框,删除draw
选项
\draw[{Latex}-] ($(O)!0.5!(f)$)--++(0:2cm)node[draw, right, fill=orange!30, font =\tiny]{\begin{tabular}{@{}p{2cm}@{}}
some text added here\\
\end{tabular}};
\documentclass[10pt]{standalone}
\usepackage{tkz-euclide}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){O}
\tkzDefPoint(150:2){A}
\tkzDefPoint(330:2){B}
\tkzDefPoint(20:2){C}
\tkzDefPoint(268:2){D}
\tkzDefMidPoint(A,C) \tkzGetPoint{e}
\tkzDefMidPoint(B,D) \tkzGetPoint{f}
\tkzDrawSegments(A,B O,D O,C B,D O,e O,f)
\tkzMarkRightAngles(O,e,A O,f,D)
\tkzDrawSector[fill=gray!20](O,B)(C)
\tkzDrawCircle[R](O,2cm)
\filldraw[fill=gray!10]
(150:2cm)
-- (20:2cm)
arc[start angle=20, end angle=150, radius=2cm]
-- cycle;
%\tkzLabelPoints(A,B,C,D,e,f,O)
\draw[{Latex}-] ($(O)!0.5!(f)$)--++(0:2cm)node[draw, right, fill=orange!30, font =\tiny]{\begin{tabular}{@{}p{2cm}@{}}
some text added here\\
\end{tabular}};
\draw[{Latex}-] ($(A)!0.5!(e)$)--++(45:2cm)--++(2,0cm)node[draw, right, fill=orange!30, font =\tiny]{\begin{tabular}{@{}p{2cm}@{}}
some text added here\\
\end{tabular}};
\draw[{Latex}-] ($(C)!0.5!(B)$)--++(45:1cm)--++(4pt,0cm)node[draw, right, fill=orange!30, font =\tiny]{\begin{tabular}{@{}p{2cm}@{}}
some text added here\\
\end{tabular}};
\end{tikzpicture}
\end{document}
答案2
您可以直接使用 tikz:例如\draw [thick, red, latex-] (80:1.5) - (80:2.5) node [above] {tembereng};
。根据需要调整坐标。