이 코드에서 보기 좋게 보이려면 어떤 숫자를 설정해야 하는지 모르겠습니다.
\documentclass{article}
\usepackage{times}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\begin{document}
\pagestyle{empty}
% Define block styles
\tikzstyle{decision} = [diamond, draw, fill=white!20,
text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, fill=white!20,
text width=5em, text centered, rounded corners, minimum height=4em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=white!20, node distance=3cm,
minimum height=2em]
\begin{tikzpicture}[node distance = 2cm, auto]
% Place nodes
\node [block] (seg) {seg};
\node [cloud, left of=seg] (ct1) {ct};
%\node [cloud, right of=init] (system) {system};
\node [block, below of=seg] (smoo) {smoo};
\node [block, below of=seg] (vol) {vol};
%\node [block, left of=evaluate, node distance=5cm] (update) {update model};
\node [block, below of=vol] (drr) {drr};
\node [block, below of=drr] (acqu) {acqu};
\node [cloud, left of=acqu] (target1) {target};
\node [block, below of=acqu] (comp) {comp};
\node [block, below of=comp] (trans) {trans};
\node [decision, below of=trans] (3d) {3d};
\node [block, below of=3d, node distance=3cm] (cloud) {cloud};
\node [block, below of=cloud] (estab) {estab};
\node [block, below of=estab] (meas) {meas};
\node [block, left of=meas] (meas2) {meas};
\node [cloud, below of=meas] (ct2) {ct set};
\node [cloud, below of=meas2] (target2) {target};
%\node [block, below of=decide, node distance=3cm] (stop) {stop};
% Draw edges
\path [line] (ct1) -- (seg);
\path [line] (seg) -- (smoo);
\path [line] (smoo) -- (vol);
\path [line] (vol) -- (drr);
\path [line] (drr) -- (acqu);
\path [line] (acqu) -- (comp);
\path [line] (comp) -- (trans);
\path [line] (trans) -- (3d);
\path [line] (cloud) -- (3d);
\path [line] (estab) -- (cloud);
\path [line] (meas) -- (estab);
\path [line] (ct2) -- (meas);
\path [line] (target2) -- (meas2);
\path [line] (meas2) |- (cloud);
\path [line] (target2) -- (meas2);
\path [line] (target1) -- (acqu);
\end{tikzpicture}
\end{document}
답변1
이는 제안이 페이지 길이를 초과하는 하나의 긴 하향식 순서도를 가로로 퍼지는 4개의 세그먼트로 나누는 가능한 솔루션 중 하나입니다.
주요 비결은 중단하려는 지점에서 below of = xx
로 변경한 다음 예를 들어 ; 이는 동쪽에서 오른쪽으로 1cm 그린 다음 수직으로 위로 그리고 수평으로 서쪽으로 회전한다는 의미입니다.right = xx cm of yy
draw[line] (acqu.east) -- ++(1cm,0) |- (comp.west)
암호
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{times}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning}
\begin{document}
\pagestyle{empty}
% Define block styles
\tikzstyle{decision} = [diamond, draw, fill=white!20,
text width=4.5em, text badly centered, node distance=2cm, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, fill=white!20,
text width=5em, text centered, rounded corners, minimum height=4em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=white!20, node distance=2cm,
minimum height=2em]
\begin{tikzpicture}[node distance = 2cm, auto]
% Place nodes
\node [block] (seg) {seg};
\node [cloud, left of=seg] (ct1) {ct};
%\node [cloud, right of=init] (system) {system};
\node [block, below of=seg] (smoo) {smoo};
\node [block, below of=smoo] (vol) {vol};
%\node [block, left of=evaluate, node distance=5cm] (update) {update model};
\node [block, below of=vol] (drr) {drr};
\node [block, below of=drr] (acqu) {acqu};
\node [cloud, left of=acqu] (target1) {target};
\node [block, right =2cm of seg] (comp) {comp};
\node [block, below of=comp] (trans) {trans};
\node [decision, below of=trans] (3d) {3d};
\node [block, right = 2cm of comp] (cloud) {cloud};
\node [block, below of=cloud] (estab) {estab};
\node [block, below of=estab] (meas) {meas};
\node [block, right = 1cm of meas] (meas2) {meas};
\node [cloud, below of=meas] (ct2) {ct set};
\node [cloud, below of=meas2] (target2) {target};
%\node [block, below of=decide, node distance=3cm] (stop) {stop};
% Draw edges
\path [line] (ct1) -- (seg);
\path [line] (seg) -- (smoo);
\path [line] (smoo) -- (vol);
\path [line] (vol) -- (drr);
\path [line] (drr) -- (acqu);
\path [line] (acqu.east) -- ++(1cm,0) |- (comp.west);
\path [line] (comp) -- (trans);
\path [line] (trans) -- (3d);
\path [line] (cloud.west) -- ++ (-1cm,0) |- (3d.east);
\path [line] (estab) -- (cloud);
\path [line] (meas) -- (estab);
\path [line] (ct2) -- (meas);
\path [line] (target2) -- (meas2);
\path [line] (meas2) |- (cloud);
\path [line] (target2) -- (meas2);
\path [line] (target1) -- (acqu);
\end{tikzpicture}
\end{document}