TikZのノード境界の太さを増やす

TikZのノード境界の太さを増やす

円形のノードがあるとします。その境界線を太くするにはどうすればよいでしょうか?

\node[circle, draw=blue!80, inner sep=0pt, minimum size=12pt] (1) (0,0) {1};

答え1

ノードの境界はパスなので、、、\pathなど、 に同じオプションを使用できます。ultra thinthickvery thick

\node[circle, draw=blue!80, thick, inner sep=0pt, minimum size=12pt] (1) at (0,0) {1};

キーline widthも同様に機能します:

\node[circle,draw=blue!80, line width=1mm, inner sep=0pt,minimum size=12pt] (1) at(0,0) {1};

定義済みの線幅はすべて

\tikzset{
    ultra thin/.style= {line width=0.1pt},
    very thin/.style=  {line width=0.2pt},
    thin/.style=       {line width=0.4pt},% thin is the default
    semithick/.style=  {line width=0.6pt},
    thick/.style=      {line width=0.8pt},
    very thick/.style= {line width=1.2pt},
    ultra thick/.style={line width=1.6pt}
}

コード

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[
   every node/.append style={circle, draw=blue!80, inner sep=0pt, minimum size=12pt}]
\node                 (1) at (0,0) {1};
\node[thick]          (2) at (1,0) {2};
\node[line width=1mm] (3) at (2,0) {3};
\end{tikzpicture}
\end{document}

出力

ここに画像の説明を入力してください

答え2

以下のようにグローバルパスの太さを変更できるので、あちこちで変更する必要はありません。

\documentclass[tikz]{standalone}
\begin{document}

\tikzstyle{every node}=[font=\large]
\tikzstyle{every path}=[line width=2pt]

\begin{tikzpicture}[
   every node/.append style={circle, draw=blue!80, inner sep=2pt, minimum size=12pt}]
\node                 (1) at (0,0) {1};
\node[]               (2) at (1,0) {2};
\node[]               (3) at (2,0) {3};
\end{tikzpicture}
\end{document}

出力(inkscape ツールを使用して PDF を PNG に変換)

出力(変換ツールを使用して PDF を PNG に変換)

関連情報