LaTeX - TiKZ画流程图

原文链接: https://my.oschina.net/shaodongtang/blog/2248993

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

\documentclass[tikz,border=8pt]{standalone}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{arrows,arrows.meta}
\usepackage{xeCJK}%\usepackage{ctex}
\setCJKmainfont{方正书宋简体}%方正书宋简体FZShuSong-Z01S
\usepackage{amsmath}
\everymath{\displaystyle}
\usepackage{unicode-math}
\setmainfont{XITS}
\setmathfont{XITS Math}
\begin{document}
% 箭头形式
\tikzstyle{arrow}=[arrows={-Stealth[scale=0.7]}]
% 流程图定义阴影
\tikzstyle{shadow}=[preaction={fill=black,opacity=.5,transform canvas={xshift=0.5mm,yshift=-0.5mm},shading=radial,shading angle=20},fill=red]
% 流程图定义基本形状
\tikzstyle{ellipse}=[draw, rectangle, minimum width=2.8em, rounded corners=6pt,line width=0.5pt]% minimum height=1.5em, fill=red!20 椭圆
\tikzstyle{pxsbx}=[trapezium, trapezium left angle=75, trapezium right angle=105, minimum width=3em, text centered, draw = black, fill=white,line width=0.5pt] %平行四边形
\tikzstyle{lingxing}=[draw,diamond,shape aspect=3,inner sep = 0.4pt,thick,font=\itshape,line width=0.5pt]%,minimum size=8mm 菱形
\begin{tikzpicture}[node distance=1.2cm]
%定义流程图具体形状
\node (start) [ellipse,inner sep=1.5pt,shadow,fill=yellow!30] {开始};
\node (shurur) [pxsbx, below of=start,node distance=1.0cm,inner sep=1.5pt,shadow,fill=blue!20] {输入$\!r$};
\node (tiaojian) [lingxing,draw, below of=shurur,inner sep=1.5pt,shadow,fill=magenta!20] {$r>0$}; % 条件框
\node (shi1) [minimum height=0cm,draw, below of=tiaojian,inner sep=2pt,node distance=1.1cm] {$d=2*r$};
\node (shi2) [minimum height=0cm,draw, below of=shi1,inner sep=2pt,node distance=1.0cm] {$m=2*\pi*r$};
\node (shi3) [minimum height=0cm,draw, below of=shi2,inner sep=2pt,node distance=1.0cm] {$s=\pi*r*r$};
\node (dayinshi) [pxsbx,below of=shi3,node distance=1.0cm,inner sep=1.5pt,shadow,fill=blue!20] {打印求和};
\node (dayinfou) [right of=tiaojian,draw,pxsbx,inner sep=1.5pt,node distance=2.65cm,shadow,fill=blue!20]  {打印 $m,d,s$}; 
\node (end) [below of=dayinfou,draw,ellipse,inner sep=1.5pt,node distance=1.1cm,shadow,fill=yellow!30]  {结束};
%连接具体形状
\draw[arrow](start) -- (shurur);
\draw[arrow](shurur) -- (tiaojian) ;
\draw[arrow](tiaojian) -- node[left=-0.5mm,red]{是}(shi1);
\draw[arrow](shi1) -- (shi2);
\draw[arrow](shi2) -- (shi3);
\draw[arrow](shi3)--(dayinshi);
\draw[arrow](dayinshi) -- ++(0,-0.6)-- ++(-1.5,0) |-(tiaojian);
\draw[arrow](tiaojian) -- node[midway,above=-1mm,red]{否}(dayinfou);
\draw[arrow](dayinfou)--(end);
\end{tikzpicture}
\end{document}
\documentclass[tikz]{standalone}
\usepackage[UTF8]{ctex}
\usepackage{pst-blur}
\usepackage{pstricks-add}
\usepackage{unicode-math}
\setmainfont{XITS}
\setmathfont{XITS Math}
\definecolor{Blue}{rgb}{1.,0.75,0.8}
\begin{document}
\psset{shadowcolor=black!70,shadowangle=-90,blur,shortput=nab}
\begin{psmatrix}[rowsep=0.7,colsep=0.9]
 \psovalbox[fillstyle=solid, fillcolor=yellow!30,shadow=true]{开始} \\
 \psparallelogrambox[fillstyle=solid,fillcolor=blue!20,shadow]{输入r} \\
 \psdiabox[fillstyle=solid, fillcolor=magenta!20,shadow=true]{$ r > 0 $} &
 \psparallelogrambox[fillstyle=solid,fillcolor=blue!20,shadow=true]{打印m, d, s} \\
 \psframebox[shadow=true]{$ d=2*r $}  & 
 \psovalbox[fillstyle=solid, fillcolor=yellow!30,shadow=true]{结束}\\
 \psframebox[shadow=true]{$ m=2*\pi*r $}  \\
 \psframebox[shadow=true]{$ s=\pi*r*r $}  \\
 \psparallelogrambox[fillstyle=solid,fillcolor=blue!20, shadow=true]{打印求和}   
\end{psmatrix}
\ncline{->}{1,1}{2,1}\ncline{->}{2,1}{3,1}
\ncline{->}{3,1}{4,1}_{\textcolor{red}{是}}
\ncline{->}{4,1}{5,1}\ncline{->}{5,1}{6,1}
\ncline{->}{6,1}{7,1}
\ncline{->}{3,1}{3,2}^{\textcolor{red}{否}}
\ncline{->}{3,2}{4,2}
\ncangles[angleA=-90,angleB=180,armA=0.5cm,armB=0.7cm]{->}{7,1}{3,1}
\end{document}

LaTeX - TiKZ画流程图_第1张图片

\documentclass[tikz]{standalone}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{arrows,arrows.meta}
\usepackage{xeCJK}%\usepackage{ctex}
\setCJKmainfont{FZShuSong-Z01S}%方正书宋简体
\usepackage{amsmath}
\everymath{\displaystyle}
\usepackage{unicode-math}
\setmainfont{XITS}
\setmathfont{XITS Math}
\begin{document}
% 流程图定义基本形状
\tikzstyle{ellipse}=[draw, rectangle, minimum width=2.8em, rounded corners=6pt,line width=0.5pt]% minimum height=1.5em, fill=red!20
\tikzstyle{pxsbx}=[trapezium, trapezium left angle=75, trapezium right angle=105, minimum width=3em, text centered, draw = black, fill=white,line width=0.5pt]
\tikzstyle{lingxing}=[draw,diamond,shape aspect=3,inner sep = 0.4pt,thick,font=\itshape,line width=0.5pt]%,minimum size=8mm
\begin{tikzpicture}[node distance=1.2cm]
%定义流程图具体形状
\node (start) [ellipse,inner sep=1.5pt] {开始};
\node (srn) [pxsbx, below of=start,node distance=1.0cm,inner sep=1.5pt] {输入$\!n=0$};
\node (yizhi) [minimum height=0cm,draw, below of=srn,node distance=1.0cm,inner sep=2pt] {$A=3^n-2^n$};
\node (panduan) [lingxing,draw, below of=yizhi,inner sep=1.5pt,minimum width=5em,minimum height=1.5em,node distance=1cm] {\phantom{$N$}};
\node (hh) [minimum height=0.95em,minimum width=3em,draw, left of=yizhi,node distance=1.0cm,inner sep=2pt,xshift=-0.8cm,yshift=-1mm] {$$};
\node (shuchu) [below of=panduan,draw,pxsbx,inner sep=1.5pt,node distance=1.1cm]  {输出$\!n$}; 
\node (end) [below of=shuchu,draw,ellipse,inner sep=1.5pt,node distance=1.0cm]  {结束};
%连接具体形状
\draw[arrows={-Stealth[scale=0.8]}](start) -- (srn);
\draw[arrows={-Stealth[scale=0.8]}](srn) -- (yizhi) ;
\path (srn) -- (yizhi) coordinate[pos=0.5](yt);
\draw[arrows={-Stealth[scale=0.8]}](yizhi) -- (panduan) ;
\draw[arrows={-Stealth[scale=0.8]}](panduan) -- (shuchu) node[pos=0.45,left=-1mm]{否};
\draw[arrows={-Stealth[scale=0.8]}](panduan) -| (hh)node[left=-1.4em,below=2.4em]{是};
\draw[arrows={-Stealth[scale=0.8]}](hh) |- (yt) ;
\draw[arrows={-Stealth[scale=0.8]}](shuchu)--(end);
\end{tikzpicture}
\end{document}

LaTeX - TiKZ画流程图_第2张图片

\documentclass[tikz]{standalone}
\usepackage{xeCJK}%\usepackage{ctex}
\setCJKmainfont{FZShuSong-Z01S}%方正书宋简体
\usepackage{amsmath}
\everymath{\displaystyle}
\usepackage{unicode-math}
\setmainfont{XITS}
\setmathfont{XITS Math}
\usepackage{tikz}
\usetikzlibrary{
    shapes.geometric,   %几何形状
    calc,               %计算
    positioning         %用于定位
}
\usetikzlibrary{arrows,arrows.meta}
\tikzset{
    every picture/.style={
        >=latex,
        node distance=5mm and 5mm
        %有无and的区别见手册positioning部分
}}

%定义框形状
\tikzstyle{SS}      %开始结束
=[rounded corners, draw,rectangle]
\tikzstyle{IO}      %输入输出
=[trapezium, trapezium left angle=70, trapezium right angle=110, draw]
\tikzstyle{NR}      %内容
=[draw]
\tikzstyle{PD}      %判断
=[diamond, aspect=4, draw, inner sep=1.5pt]
\begin{document}
%例1
\begin{tikzpicture}[->,arrows={-Stealth[scale=0.8]}] 
%放框 
\node[SS](start){开始}; 
\node[IO, below=of start](in){输入$N$}; 
\node[NR, below=of in](n1){$k=1$, $S=0$}; 
\node[NR, below=of n1](n2){$S=S+\dfrac1{k(k+1)}$}; 
\node[NR, right=of n2](n3){$k=k+1$}; 
\node[PD, below=of n2](pd){$k] 
\node[SS](start){开始}; 
\node[NR, below=of start](n1){$a=1$}; 
\node[NR, below right=1mm and 5mm of n1](n2){$a=a^2+2$}; 
\node[PD, below=8mm of n1](pd){$a<10$?}; 
\node[IO, below=of pd](out){输出$a$}; 
\node[SS, below=of out](stop){结束}; 
\path (start) edge (n1) 
(n1) edge (pd) 
(pd) edge node[right]{否}(out) 
(out) edge (stop); 
\draw (pd.east)node[below]{是} -| (n2); 
\draw (n2) -- (n2-|n1); 
\end{tikzpicture}
%例3
\begin{tikzpicture}[->] 
\node[SS](start){开始}; 
\node[IO, below=of start](in){输入$x$, $t$}; 
\node[NR, below=of in](n1){$M=1$, $S=3$, $k=1$}; 
\node[PD, below=of n1](pd){$k\le t$}; 
\node[NR, on grid, below left=1cm and 2cm of pd](n3){$M=\dfrac Mkx$}; 
\node[IO, on grid, below right=1cm and 2cm of pd](out){输出$S$}; 
\node[NR, below=of n3](n4){$S=M+S$}; 
\node[NR, below=of n4](n5){$k=k+1$}; 
\node[SS, below=of out](stop){结束}; 
\path (start) edge (in) 
(in) edge (n1) 
(n1) edge (pd) 
(n3) edge (n4) 
(n4) edge (n5) 
(out) edge (stop); 
\draw (pd) -| node[left]{是} (n3); 
\draw (pd) -| node[right]{否} (out); 
\draw (n5.west)--++(-0.5,0) |- ($(n1.south)!0.5!(pd.north)$); 
\end{tikzpicture}
\end{document}

LaTeX - TiKZ画流程图_第3张图片LaTeX - TiKZ画流程图_第4张图片LaTeX - TiKZ画流程图_第5张图片

\documentclass[tikz]{standalone}
\usepackage[UTF8]{ctex}
\usepackage[paperwidth=7cm,paperheight=12cm,,top=3cm,bottom=0cm]{geometry}
\begin{document}

\setlength{\unitlength}{1mm}
\newcommand{\wrt}[1]{\makebox(0,0)[c]{#1}}
\newcommand{\lline}[1]{\line(-1,0){#1}}
\newcommand{\rline}[1]{\line(1,0){#1}}
%\newcommand{\Uline}[1]{\line(0,1){#1}}
\newcommand{\dline}[1]{\line(0,-1){#1}}
\newcommand{\lvec}[1]{\vector(-1,0){#1}}
\newcommand{\rvec}[1]{\vector(1,0){#1}}
\newcommand{\uvec}[1]{\vector(0,1){#1}}
\newcommand{\dvec}[1]{\vector(0,-1){#1}}
\newsavebox{\condition}
\newsavebox{\process}
\newsavebox{\inputoutput}
\savebox{\process}(0,0){\thicklines
    \put(-10,-3){\framebox(20,6){}}
}
\savebox{\condition}(0,0){\thicklines
    \put(-10,0){\line(2,1){10}}
    \put(-10,0){\line(2,-1){10}}
    \put(10,0){\line(-2,1){10}}
    \put(10,0){\line(-2,-1){10}}
}
\savebox{\inputoutput}(0,0){\thicklines
    \put(-10.5,-3){\rline{18}}
    \put(-10.5,-3){\line(1,2){3}}
    \put(10.5,3){\lline{18}}
    \put(10.5,3){\line(-1,-2){3}}
}

{\vspace*{1cm}\hspace*{3cm}
\begin{picture}(45,73)(20,-73)\thicklines
\put(40,3){\oval(15,6)}\put(40,3){\wrt{开始}} \put(40,0){\dvec{5}}
\put(40,-8){\usebox{\inputoutput}} \put(40,-8){\wrt{输入$m,\,n$}}
\put(40,-11){\dvec{5}} \put(40,-19){\usebox{\process}}
\put(40,-19){\wrt{$i=1$}} \put(40,-22){\dvec{8}}
\put(40,-33){\usebox{\process}} \put(40,-33){\wrt{$a=m\times i$}}
\put(40,-36){\dvec{5}} \put(40,-46){\usebox{\condition}}
\put(40,-46){\wrt{$n$整除$a$?}} \put(40,-51){\dvec{5}}
\put(41,-53){\makebox(0,0)[l]{是}}
\put(40,-59){\usebox{\inputoutput}} \put(40,-59){\wrt{输出$a,\,i$}}
\put(40,-62){\dvec{5}}
\put(40,-70){\oval(15,6)}\put(40,-70){\wrt{结束}}
\put(30,-46){\line(-1,0){15}} \put(28,-45){\makebox(0,0)[b]{否}}
\put(15,-46){\uvec{10}} \put(15,-33){\usebox{\process}}
\put(15,-33){\wrt{$i=i+1$}} \put(15,-30){\line(0,1){5}}
\put(15,-25){\rvec{25}}
\end{picture}}


\end{document}

LaTeX - TiKZ画流程图_第6张图片

\documentclass[11pt]{article}
\usepackage{tikz} 
\usetikzlibrary{shadows,arrows,positioning,shapes.geometric} % Define the layers to draw the diagram
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}

\tikzstyle{TDK} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm, text centered, text width=4cm, draw=black, fill=red!30, drop shadow]
\tikzstyle{CFX} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm, text centered, text width=4cm, draw=black, fill=blue!30, drop shadow]
\tikzstyle{Matlab} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=4cm, draw=black, fill=orange!30, drop shadow]
\tikzstyle{arrow} = [thick, ->, >=stealth]
\tikzstyle{texto} = [above, text width=6em, text centered]
\tikzstyle{linepart} = [draw, thick, color=black!50, -latex', dashed] \tikzstyle{line} = [draw, thick, color=black!50, -latex']

% Define distances for bordering \newcommand{\blockdist}{1.3} \newcommand{\edgedist}{1.5}

\newcommand{\etape}[2]{node (p#1) [etape] {#2}}
\newcommand{\matlab}[2]{node (p#1) [Matlab] {#2}}
\newcommand{\tdk}[2]{node (p#1) [TDK] {#2}}
\newcommand{\cfx}[2]{node (p#1) [CFX] {#2}}

% Draw background
\newcommand{\background}[5]{%
\begin{pgfonlayer}{background} % Left-top corner of the background rectangle 
\path (#1.west |- #2.north)+(-0.5,0.25) node (a1) {};
% Right-bottom corner of the background rectanle
\path (#3.east |- #4.south)+(+0.5,-0.25) node (a2) {}; % Draw the background
\path[fill=yellow!20,rounded corners, draw=black!50, dashed] (a1) rectangle (a2);
\path (#3.east |- #2.north)+(0,0.25)--(#1.west |- #2.north) node[midway] (#5-n) {};
\path (#3.east |- #2.south)+(0,-0.35)--(#1.west |- #2.south) node[midway] (#5-s) {};
\path (#3.east |- #2.north)+(0.7,0)--(#3.east |- #4.south) node[midway] (#5-w) {};
\path (a1.east |- a1.south)+(1.3,-1.3) node (u1)[texto] {\textit{#5}}; \end{pgfonlayer}}

\newcommand{\transreceptor}[3]{% 
\path [linepart] (#1.east) -- node [above] {\scriptsize #2} (#3);}

\begin{document}
\noindent
\begin{tikzpicture}[node distance=2cm,x=0.675cm,y=0.6cm]
\path \tdk{1}{TDK 2D Düsenströmung mit Reaktionskinetik};
\path (p1.south)+(0.0,-2.0)\matlab{2}{Matlab Konvertierung von Wärmestromverlauf $\dot{q}_w$}; 
\path (p2.east)+(5.0,0.0) \cfx{3}{Ansys CFX 3D Kühlkanalströmung};
\path (p3.east)+(6.0,0.0) \tdk{4}{TDK 2D Düsenströmung mit Reaktionskinetik}; 
\path (p4.north)+(-4.5,2.5) \matlab{5}{Matlab Konvertierung von Wärmestromverlauf $\dot{q}_w$};
\path (p4.south)+(-4.5,-2.5) \matlab{6}{Matlab Konvertierung von Wärmestromverlauf $\dot{q}_w$};

\path [line] (p1.south) -- node [above] {} (p2);
\path [line] (p2.east) -- node [above] {} (p3); \path [line] (p3.south) |- node [above] {} (p6);
\path [line] (p4.north) |- node [below] {} (p5);
\path [line] (p6.east) -| node [above] {} (p4);
\path [line] (p5.west) -| node [above] {} (p3);

\background{p3}{p5}{p4}{p6}{Iterationen in Matlab}

\end{tikzpicture}

\end{document}

LaTeX - TiKZ画流程图_第7张图片

\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{shadows,arrows,positioning}
% Define the layers to draw the diagram
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}

% Define block styles
\tikzstyle{materia}=[draw, fill=blue!20, text width=6.0em, text centered,
  minimum height=1.5em,drop shadow]
\tikzstyle{etape} = [materia, text width=8em, minimum width=10em,
  minimum height=3em, rounded corners, drop shadow]
\tikzstyle{texto} = [above, text width=6em, text centered]
\tikzstyle{linepart} = [draw, thick, color=black!50, -latex', dashed]
\tikzstyle{line} = [draw, thick, color=black!50, -latex']
\tikzstyle{ur}=[draw, text centered, minimum height=0.01em]

% Define distances for bordering
\newcommand{\blockdist}{1.3}
\newcommand{\edgedist}{1.5}

\newcommand{\etape}[2]{node (p#1) [etape]
  {#2}}

% Draw background
\newcommand{\background}[5]{%
  \begin{pgfonlayer}{background}
    % Left-top corner of the background rectangle
    \path (#1.west |- #2.north)+(-0.5,0.25) node (a1) {};
    % Right-bottom corner of the background rectanle
    \path (#3.east |- #4.south)+(+0.5,-0.25) node (a2) {};
    % Draw the background
    \path[fill=yellow!20,rounded corners, draw=black!50, dashed]
      (a1) rectangle (a2);
      \path (#3.east |- #2.north)+(0,0.25)--(#1.west |- #2.north) node[midway] (#5-n) {};
      \path (#3.east |- #2.south)+(0,-0.35)--(#1.west |- #2.south) node[midway] (#5-s) {};
      \path (#3.east |- #2.north)+(0.7,0)--(#3.east |- #4.south) node[midway] (#5-w) {};
  \end{pgfonlayer}}

\newcommand{\transreceptor}[3]{%
  \path [linepart] (#1.east) -- node [above]
    {\scriptsize #2} (#3);}

\begin{document}
\begin{tikzpicture}[scale=0.7,transform shape]

  % Draw diagram elements
  \path \etape{1}{Raw signal};

  \path (p1.south)+(0.0,-1.5) \etape{2}{Pre-1};
  \path (p2.south)+(0.0,-1.0) \etape{3}{Pre-2};

  \path (p3.south)+(0.0,-1.5) \etape{4}{Feature extract};
  \path (p4.south)+(0.0,-1.0) \etape{5}{Model fitting};

  \path (p5.south)+(-3.0,-2.0) \etape{6}{training};
  \path (p5.south)+(3.0,-2.0) \etape{7}{testing};
  \node [below=of p5] (p6-7) {};

  \path (p6.south)+(0.0,-2.0) \etape{8}{normal};
  \path (p7.south)+(0.0,-2.0) \etape{9}{abnormal};
  \node [below=of p6-7] (p8-9) {};

  % Draw arrows between elements
  \path [line] (p1.south) -- node [above] {} (p2);
  \path [line] (p2.south) -- node [above] {} (p3);
  \path [line] (p3.south) -- node [above] {} (p4);
  \path [line] (p4.south) -- node [above] {} (p5);

  \background{p2}{p2}{p3}{p3}{bk1}
  \background{p4}{p4}{p5}{p5}{bk2}
  \background{p6}{p6}{p7}{p7}{bk3}

  \path [line] (p5.south) -- node [above] {} (bk3-n);
  \path [line] (bk3-s) -- node [above] {} (p8);
  \path [line] (bk3-s) -- node [above] {} (p9);
  \path (bk1-w)+(+6.0,0) node (ur1)[ur] {};
  \path (bk2-w)+(+6.0,0) node (ur2)[ur] {};
  \path (bk3-w)+(+3.0,0) node (ur3)[ur] {};
  \transreceptor{bk1-w}{pre processing}{ur1};
  \transreceptor{bk2-w}{Feature selection}{ur2};
  \transreceptor{bk3-w}{classification}{ur3};
\end{tikzpicture}
\end{document}

LaTeX - TiKZ画流程图_第8张图片

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{fit,arrows,calc,positioning}

\begin{document}

\tikzstyle{block} = [rectangle, draw, fill=white,text width=16em,  text centered, minimum height=4em, thick]

\tikzstyle{blks} = [rectangle, draw, fill=white, text width=6em,  text centered, minimum height=4em, dashed]

\tikzstyle{big} = [rectangle, draw, inner sep=0.5cm]

\tikzstyle{line} = [draw, -latex',thick]

\begin{tikzpicture}[auto]
\node [block](exe) {\textbf{Executive}};
\node [block, below=of exe] (mgm) {\textbf{Departmental managers}};
\node [blks, below=2cm of mgm] (fin) {Finance};
\node [blks, right=of fin] (prod) {Production};
\node [blks, left=of fin] (resch) {Research};

\node [block, below= 2cm of fin] (sub) {\textbf{Sub-ordinate}};
\node[above =0.2cm of  fin] (A) {\textbf{Department}};
\node [below = 0.3 of mgm, big,fit=(fin) (prod)(resch)(A), inner sep=0.5cm] (dept) {};

\path [line] (exe)--(mgm);
\path [line] (mgm) -- (dept);
\path [line] (resch)--(fin);
\path [line] (fin)--(prod);
\path [line] (dept) -- (sub); 

\end{tikzpicture}
\end{document}

LaTeX - TiKZ画流程图_第9张图片

\documentclass[tikz,border=5]{standalone}
\usetikzlibrary{chains}

\begin{document}
\begin{tikzpicture}
\begin{scope}[start chain=going right, every join/.style={->},
  every node/.style={draw, align=center, on chain, join, minimum height=1cm}]

\node {Circuit is \\ designed in SPICE GUI};
\node {Netlist Exported \\ and used to make Template in MATLAB};
\node [continue chain=going below] {MATLAB takes Parameters};
\node [continue chain=going left]  {Writes Netlist to disk};
\node {Calls SPICE};
\node [continue chain=going below] {Spice Simulates Circuit};
\node [continue chain=going right] {Writes Results to Disk};
\node [continue chain=going below] {MATLAB Parses  Results from Disk};
\node [continue chain=going left]  {Matlab Processes Results \\ and Calculates Delays};

\end{scope}
\end{tikzpicture}

\end{document}

LaTeX - TiKZ画流程图_第10张图片

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{arrows.meta,arrows}
\begin{document}
\begin{tikzpicture}
[auto,
decision/.style={diamond, draw=blue, thick, fill=blue!20,
	text width=4.5em,align=flush center,
	inner sep=1pt},
block/.style ={rectangle, draw=blue, thick, fill=blue!20,
	text width=5em,align=center, rounded corners,
	minimum height=4em},
line/.style ={draw, thick, -latex',shorten >=2pt},
cloud/.style ={draw=red, thick, ellipse,fill=red!20,
	minimum height=2em}]
\matrix [column sep=5mm,row sep=7mm]
{
	% row 1
	\node [cloud] (expert) {expert}; &
	\node [block] (init) {initialize model}; &
	\node [cloud] (system) {system}; \\
	% row 2
	& \node [block] (identify) {identify candidate model}; & \\
	% row 3
	\node [block] (update) {update model}; &
	\node [block] (evaluate) {evaluate candidate models}; & \\
	% row 4
	& \node [decision] (decide) {is best candidate}; & \\
	% row 5
	& \node [block] (stop) {stop}; & \\
};
\begin{scope}[every path/.style=line]
\path (init) -- (identify);
\path (identify) -- (evaluate);
\path (evaluate) -- (decide);
\path (update) |- (identify);
\path (decide) -| node [near start] {yes} (update);
\path (decide) -- node [midway] {no} (stop);
\path [dashed] (expert) -- (init);
\path [dashed] (system) -- (init);
\path [dashed] (system) |- (evaluate);
\end{scope}
\end{tikzpicture}
\end{document} 

LaTeX - TiKZ画流程图_第11张图片

转载于:https://my.oschina.net/shaodongtang/blog/2248993

你可能感兴趣的:(LaTeX - TiKZ画流程图)