我將一些圓形節點放置在等邊三角形中:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
[nodestyle/.style={circle,draw=blue!50,fill=blue!20,thick}]
\node (A) at (0,1.732) [nodestyle] {A};
\node (B) at (-1,0) [nodestyle] {B};
\node (C) at (1,0) [nodestyle] {C};
\end{tikzpicture}
\end{document}
現在我想要類似的東西\draw [->] (A.south west) -- (B.north east)
,但錨點沒有放置在225deg
/45deg
但是240deg
/60deg
如何設定錨點的度數?
答案1
為什麼要指定錨點?
讓 TikZ 完成它的工作:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
[nodestyle/.style={circle,draw=blue!50,fill=blue!20,thick}]
\node (A) at (0,1.732) [nodestyle] {A};
\node (B) at (-1,0) [nodestyle] {B};
\node (C) at (1,0) [nodestyle] {C};
\draw [->] (A) -- (B);
\end{tikzpicture}
\end{document}