如何為節點設定真正精確的半徑?

如何為節點設定真正精確的半徑?

建立能階圖,我使用這個答案使節點圓的半徑相等:如何設定節點的精確半徑?

\documentclass{report}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[circle,draw,blue,text width=0.3cm,text height=0.3cm] at (5,9) {$\uparrow$};% 4d
\node[circle,draw,blue,text width=0.3cm,text height=0.3cm] at (6,9) {$\uparrow$};% 4d
\node[circle,draw,blue,text width=0.3cm,text height=0.3cm] at (7,9) {};% 4d
\node[circle,draw,blue,text width=0.3cm,text height=0.3cm] at (8,9) {\phantom{6}};% 4d
\node[circle,draw,blue,text width=0.3cm,text height=0.3cm] at (9,9) {\quad};% 4d
\end{tikzpicture}
\end{document}

但空節點仍然比填充節點小一點!嘗試包括幻影或四軸無濟於事。

我缺什麼?

答案1

您不必使用幻影等來控制圓圈的大小。只需使用適用於所有圓圈的選項minimum size=<length>,例如選擇足夠大的尺寸minimum size=0.7cm。將東西放在 a 中cir/.style可以使程式碼更加優雅。

\documentclass{report}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[cir/.style={circle,draw,blue,minimum size=0.7cm}]
\node[cir] at (5,9) {$\uparrow$};% 4d
\node[cir] at (6,9) {$\uparrow$};% 4d
\node[cir] at (7,9) {};% 4d
\node[cir] at (8,9) {};% 4d
\node[cir] at (9,9) {};% 4d
\end{tikzpicture}
\end{document}

在此輸入影像描述

相關內容