
원 모양의 노드가 있다고 가정합니다. 테두리를 더 두껍게 만들려면 어떻게 해야 합니까?
\node[circle, draw=blue!80, 내부 sep=0pt, 최소 크기=12pt] (1) at (0,0) {1};
답변1
노드의 경계는 경로입니다. \path
예를 들어 ultra thin
, thick
, very 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로 변환)