흐름도 - 화살표

흐름도 - 화살표

이제 아래와 같은 흐름도를 만들고 있습니다. 하지만 페이지 중앙에서 전체 차트를 조정하는 방법을 모르겠습니다. (페이지 상단에는 없음) 또한 아래 그래프와 같이 가운데 화살표를 만드는 방법과 하단 화살표 아래에 문구를 추가하는 방법에 대한 아이디어가 있습니까? (말씀이 너무 많습니다.) 정말 감사합니다. 모든 유용한 아이디어를 위해. 여기에 이미지 설명을 입력하세요

\documentclass{article}
%-----------------------------------------------
\usepackage{pdflscape}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{eurosym}
%\usepackage{rotating}
\usepackage{adjustbox}
%\usepackage[pdftex]{graphics}
\usepackage[a4paper,margin=0mm]{geometry}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, calc, chains, quotes, chains, positioning, shapes.geometric}
\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=4cm, minimum height=1cm,text centered, text width=4cm, draw=black]
\tikzstyle{process} = [rectangle, rounded corners, minimum width=4cm, minimum height=1cm, text centered, text width=4cm, draw=black]
\tikzstyle{process2} = [rectangle, rounded corners, minimum width=4cm, minimum height=1cm, text centered, text width=4cm, draw=black, fill=orange!0]
\tikzstyle{process3} = [rectangle, rounded corners, minimum width=4cm, minimum height=1cm, text centered, text width=4cm, draw=black, fill=orange!0]
\tikzstyle{process4} = [rectangle, rounded corners, minimum width=4cm, minimum height=1cm, text centered, text width=4cm, draw=black, fill=orange!0]
\tikzstyle{process5} = [rectangle, rounded corners, minimum width=4cm, minimum height=1cm, text centered, text width=4cm, draw=black, fill=orange!0]
\tikzstyle{arrow} = [thick,->,>=stealth]
\tikzstyle{line}=[draw, very thick, color=black!75, -latex']
\tikzstyle{empty}=[]
%-----------------------------------------------

\begin{document}
\begin{landscape}
\begin{figure}[htb]
\centering
\begin{adjustbox}{width=29.5cm, height=\textheight, keepaspectratio}
\begin{tikzpicture}[node distance=2cm][scale=0.01,anchor=center]
\node (start) [startstop] {\footnotesize Employed Income \\ $<$ 59 400 \euro};
\node (pro2) [process, below = 10mm of start]{\footnotesize Employed Income \\ $>$ 59 400 \euro};
\node (pro1) [process2, below = 1mm of pro2]{\footnotesize Self-Employed};
\node (pro3) [process3, below = 1mm of pro1]{\footnotesize Civil Servants};
\node (pro4) [process4, right = 4cm of start]{\footnotesize SHI};
\node (pro5) [process5, right = 4cm of pro1]{\footnotesize PHI};

\draw [arrow] (start) -- node[anchor=south]{mandatory}(pro4);
\draw [arrow,dashed] (pro3.east) -- (pro5.west);

\end{tikzpicture}
\end{adjustbox}
\end{figure}
\end{landscape}


\end{document}

답변1

테이블에 많은 문제가 있습니다.

을 위한 tikzpicture:

  • 이미지 요소의 스타일은 더 이상 사용되지 않습니다 tikzstyle. 대신에 사용해야 합니다 tizset(아래 mwe 참조).
  • 스타일이 일관성이 없습니다. 모든 노드의 모양은 동일합니다
  • 정의된 채우기 색상이 이상합니다: fill= orange!0? 이건 똑같아 fill=white...
  • 왜 먼저 이미지의 크기를 줄인 다음 adjustbox? 만큼 확대합니까? 훨씬 더 나은 것은 이미지를 자연스러운 크기로 그리는 것입니다.
  • 글꼴 크기는 다음과 같이 정의하세요: {\footnotesize text in the node}`. 이로 인해 여러 줄의 텍스트에서 잘못된 줄 간격이 발생합니다.
  • minimum width와 같다고 정의하면 불필요한 text widthminimum width입니다. 텍스트 너비에 2를 더한 것보다 크면 의미가 있습니다.inner xsep

페이지의 이미지 센터:

  • 그림의 위치 옵션을 생략하세요

이 외에도 더 불분명한 것들이 있습니다. 예를 들어 이미지가 그다지 크지 않은 경우 페이지 테두리가 0으로 설정되는 이유 등입니다.

다음 코드 개정을 제안합니다.

\documentclass{article}
%-----------------------------------------------
\usepackage{pdflscape}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{eurosym}
%\usepackage{rotating}
\usepackage{adjustbox}
%\usepackage[pdftex]{graphics}
\usepackage[a4paper,margin=0mm]{geometry}

\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                calc, chains,
                positioning,
                quotes,
                shapes.geometric}
\tikzset{
         > = Stealth,
box/.style = {rectangle, rounded corners,
              draw=#1, fill=#1!30, thick,
              text width=4cm, minimum height=1cm, align=center},
lin/.style = {draw=gray, very thick},
every edge quotes/.append style = {font=\footnotesize, align=left}
        }
%-----------------------------------------------

\begin{document}
    \begin{landscape}
\begin{figure}
\centering
    \begin{tikzpicture}[%transform shape, scale=2, % use in case 
                                                   % when you like to enlarge image
node distance = 2mm and 44 mm
                        ]
    \begin{scope}[box/.default = olive]
\node (n1) [box]                    {Employed Income \\ $<$ 59 400 \euro};
\node (n2) [box, below=6mm of n1]   {Employed Income \\ $>$ 59 400 \euro};
\node (n3) [box, below=of n2]       {Self-Employed};
\node (n4) [box, below=of n3]       {Civil Servants};
%
\node (n5) [box, right=of n1]       {SHI};
\node (n6) [box, right=of n3]       {PHI};
    \end{scope}
%
\draw [lin,->] (n1)    to ["mandatory"]    (n5);
%
    \draw [lin]  (n2.east) -- ++ (0.5,0) |- (n3) coordinate[pos=0.25] (aux);
\draw [lin,->]   (aux) to ["choice"]  ++ (1.2,0) to (n5.south west);
\draw [lin,->]   (aux)                ++ (1.2,0) to (n6);
%
\draw [lin,->,dashed]  (n4.east) to ["Additional insurance\\
                                   (most healt care costs\\
                                   for civil servants are\\
                                   \dots" ',pos=0.2]  (n6);

    \end{tikzpicture}
\end{figure}
    \end{landscape}
\end{document}

결과가 원하는 결과에 가까운지 확인하십시오.

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

관련 정보