Tikz: 텍스트가 Tikz 상자 중앙에 위치하지 않음

Tikz: 텍스트가 Tikz 상자 중앙에 위치하지 않음

tikzpicture 패키지(Mathcha)를 사용하여 순서도 유형의 다이어그램을 구성하려고 합니다. Tikz 상자 안의 텍스트가 중앙에 위치하지 않는 이유는 무엇입니까? 미리 감사드립니다.

\begin{figure}[ht]
\vspace{4ex}
\centering
\begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
%uncomment if require: \path (0,634); %set diagram left start at 0, and has height of 634

%Shape: Rectangle [id:dp08909796923277336] 
\draw  [line width=1.5]  (51,41) -- (609,41) -- (609,81) -- (51,81) -- cycle ;
%Shape: Rectangle [id:dp293971635997501] 
\draw  [line width=1.5]  (210,359.72) -- (520,359.72) -- (520,401.3) -- (210,401.3) -- cycle ;
%Shape: Rectangle [id:dp015112508692092352] 
\draw  [line width=1.5]  (190,210.2) -- (310,210.2) -- (310,250) -- (190,250) -- cycle ;
%Shape: Rectangle [id:dp9224449615071879] 
\draw  [line width=1.5]  (490,209.82) -- (610,209.82) -- (610,250.13) -- (490,250.13) -- cycle ;
%Straight Lines [id:da2085806199614264] 
\draw [line width=1.5]    (550,249.95) -- (550,379.8) -- (525,380.07) ;
\draw [shift={(521,380.12)}, rotate = 359.37] [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.08]  [draw opacity=0] (11.61,-5.58) -- (0,0) -- (11.61,5.58) -- cycle    ;
%Straight Lines [id:da6918276956657493] 
\draw [line width=1.5]    (180,81.59) -- (180,149.45) ;
%Straight Lines [id:da8143556798116779] 
\draw [line width=1.5]    (110,250.35) -- (110,310.21) -- (250,310.01) -- (250,249.93) ;
%Straight Lines [id:da6498353350246521] 
\draw [line width=1.5]    (180,310.11) -- (180,379.97) -- (205,380.35) ;
\draw [shift={(209,380.42)}, rotate = 180.89] [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.08]  [draw opacity=0] (11.61,-5.58) -- (0,0) -- (11.61,5.58) -- cycle    ;
%Shape: Rectangle [id:dp6903312621520653] 
\draw  [line width=1.5]  (50,210.2) -- (170,210.2) -- (170,250) -- (50,250) -- cycle ;
%Straight Lines [id:da6819495654480933] 
\draw [line width=1.5]    (110,209.57) -- (110,149.57) -- (250,149.68) -- (250,209.87) ;
%Straight Lines [id:da4777805352746255] 
\draw [line width=1.5]    (400,81.72) -- (400,205.1) ;
\draw [shift={(400,209.1)}, rotate = 270] [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.08]  [draw opacity=0] (11.61,-5.58) -- (0,0) -- (11.61,5.58) -- cycle    ;
%Straight Lines [id:da6994702521621938] 
\draw [line width=1.5]    (480,310.37) -- (480,354.55) ;
\draw [shift={(480,358.55)}, rotate = 270] [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.08]  [draw opacity=0] (11.61,-5.58) -- (0,0) -- (11.61,5.58) -- cycle    ;
%Straight Lines [id:da5755824703070298] 
\draw [line width=1.5]    (400,250.37) -- (400,354.55) ;
\draw [shift={(400,358.55)}, rotate = 270] [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.08]  [draw opacity=0] (11.61,-5.58) -- (0,0) -- (11.61,5.58) -- cycle    ;
%Straight Lines [id:da11378713626826986] 
\draw [line width=1.5]    (550,81.72) -- (550,205.1) ;
\draw [shift={(550,209.1)}, rotate = 270] [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.08]  [draw opacity=0] (11.61,-5.58) -- (0,0) -- (11.61,5.58) -- cycle    ;
%Shape: Rectangle [id:dp2737101017997946] 
\draw  [line width=1.5]  (340,209.82) -- (460,209.82) -- (460,250.13) -- (340,250.13) -- cycle ;
%Shape: Rectangle [id:dp04718661092413878] 
\draw  [line width=1.5]  (430,270.07) -- (530,270.07) -- (530,309.88) -- (430,309.88) -- cycle ;
%Straight Lines [id:da40081723928825497] 
\draw [line width=1.5]    (400,290.1) -- (425,290.1) ;
\draw [shift={(429,290.1)}, rotate = 180] [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.08]  [draw opacity=0] (11.61,-5.58) -- (0,0) -- (11.61,5.58) -- cycle    ;

% Text Node
\draw (181,52) node [anchor=north west][inner sep=0.75pt]  [font=\normalsize] [align=center] {High Position on Alphabetically Ordered List};
% Text Node
\draw (348,222) node [anchor=north west][inner sep=0.75pt]  [font=\normalsize] [align=center] {Higher Visibility};
% Text Node
\draw (445,281) node [anchor=north west][inner sep=0.75pt]  [font=\normalsize] [align=center] {Familiarity};
% Text Node
\draw (57,222.18) node [anchor=north west][inner sep=0.75pt]  [font=\normalsize] [align=center] {Status quo bias};
% Text Node
\draw (251,371.18) node [anchor=north west][inner sep=0.75pt]  [font=\normalsize] [align=center] {Higher Trading Activity + Liquiditiy};
% Text Node
\draw (495,222) node [anchor=north west][inner sep=0.75pt]  [font=\normalsize] [align=center] {Superior Quality};
% Text Node
\draw (215,222.18) node [anchor=north west][inner sep=0.75pt]  [font=\normalsize] [align=center] {Satisficing};

\end{tikzpicture}
\end{figure}

여기에 이미지 설명을 입력하세요

답변1

노드의 텍스트가 중앙에 위치하지 않는 이유는 실제로 노드처럼 보이는 것(검은색 직사각형)이 실제로는 검은색 직사각형이기 때문입니다. 그런 다음 테두리가 없는 노드를 사용하여 나중에 텍스트의 위치를 ​​지정합니다. 슬프네요. 이 노드는 직사각형 중앙에 제대로 배치되지 않았습니다.

일부 소프트웨어에서 생성된 이 끔찍한 출력을 사용하지 말고 대신 Ti를 처리하는 방법을 이해하려고 노력하는 것이 좋습니다.케이Z 그리고 이것을 직접 그려보세요. 나는 Ti라는 것을 안다.케이Z/PGF 매뉴얼은 거대하고 위협적이지만 기본 사항을 훌륭하게 설명하는 멋진 튜토리얼도 포함되어 있습니다. 천천히 진행하면 정말 효과가 있고 구문에 빠르게 익숙해질 것입니다.

표시된 다이어그램은 다음과 같이 그릴 수 있습니다.

\documentclass[border=10pt]{standalone} 
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[
    x=1.75cm,
    y=1.75cm,
    line width=1pt,
    >=latex,
    every node/.style={
        rectangle,
        draw,
        inner ysep=10pt,
        text width=3cm,
        align=center,
    },
    narrow/.append style={
        text width=2cm,
    },
    wide/.append style={
        text width=7cm,
    },
    very wide/.append style={
        text width=13.5cm,
    },
]

\node[very wide] at (0,0) (a1) {\textbf{High Position on Alphabetically Ordered List}};

\node at (-3,-2) (b1) {Status quo bias};
\node at (-1,-2) (b2) {Satisficing};
\node at (1,-2) (b3) {Higher Visibility};
\node at (3,-2) (b4) {Superior Quality};

\node[narrow] at (2,-2.75) (c1) {Familiarity};

\node[wide] at (0.5,-4) (d1) {\textbf{Higher Trading Activity $+$ Liquidity}};

\draw (-2,-1 |- a1.south) -- (-2,-1);
\draw (-2,-1) -| (b1.north);
\draw (-2,-1) -| (b2.north);

\draw (b1.south) |- (-2,-3);
\draw (b2.south) |- (-2,-3);
\draw[->] (-2,-3) |- (d1.west);

\draw[->] (b3.north |- a1.south) -- (b3.north);
\draw[->] (b4.north |- a1.south) -- (b4.north);

\draw[->] (b3.south) -- (b3.south |- d1.north);
\draw[->] (b3.south |- c1.west) -- (c1.west);
\draw[->] (c1.south) -- (c1.south |- d1.north);
\draw[->] (b4.south) |- (d1.east);

\end{tikzpicture}

\end{document}

여기에 이미지 설명을 입력하세요

관련 정보