如何在某个坐标处绘制箭头圆圈?

如何在某个坐标处绘制箭头圆圈?

我定义了一个箭头圆,但我不知道如何将它移动到指定的坐标。

代码:

\begin{tikzpicture}  
\foreach \x in {0,30,...,360} \draw[<-] (\x:0.35cm) -- (\x:0.7cm);    
\end{tikzpicture}

答案1

像这样?

\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\tikzset{
  pics/arcirc/.style args={#1,name=#2}{
    code={
      \begin{scope}[local bounding box=#2,>=latex]
        \foreach \x in {0,30,...,360} \draw[<-,#1] (\x:0.35cm) -- (\x:0.7cm);   
      \end{scope}
    }
  }
}
\begin{document}
\begin{tikzpicture}  
\pic at (0,0) {arcirc={red,name=a}};
\pic at (2,0) {arcirc={blue,name=b}};
\pic at (0,-2) {arcirc={green,name=c}};
\pic at (2,-2) {arcirc={cyan,name=d}};
\node at (a.center){a};
\node [draw,circle,minimum size=1pt] at (b.center){};
\draw [green](c.90)--++(0:1)node[midway,above]{text};
\end{tikzpicture}

\end{document}

在此处输入图片描述

相关内容