有人能帮我用 LaTeX 制作这个流程图吗?

有人能帮我用 LaTeX 制作这个流程图吗?

在此处输入图片描述

到目前为止我所做的还远远没有达到我想要的效果:

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usepackage{mathtools}
\usepackage{ifthen}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}



\begin{document}
%Flow diagram Node Definitions
\tikzstyle{prof} = [rectangle, rounded corners, minimum width=2cm,     minimum height=0.5cm,text centered,text width=8em, draw=black, fill=red!30]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=15em, draw=black, fill=green!30]
\tikzstyle{arrow} = [->, >=latex', shorten >=1pt, thick]
\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=2cm,minimum width=2.5cm, minimum height=2em, align=center]
\tikzstyle{cfr} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered,text width=15em, draw=black, fill=blue!40]
\tikzstyle{cbr} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text width=15em,text centered, draw=black, fill=blue!40]
\tikzstyle{hyb} = [rectangle, rounded corners, minimum width=4cm, minimum height=1cm,text width=25em, text centered, draw=black, fill=green!30]


\begin{figure}
\begin{center}
\begin{tikzpicture}[node distance=2cm]


\node (bt) [cfr] {Phase 7};
\node (pp) [cbr, right of=bt, xshift=8.5cm] {Phase 1};
\node (newuser) [cfr, below of=bt,yshift=-2.5cm, xshift=-3cm] {Phase 2};
\node (olduser) [cbr, below of=pp,yshift=-2.5cm, xshift=2cm] {Phase 3};
\node (dm) [cbr, below of=bt, yshift=-7cm] {Phase 4};
\node (dmo) [cbr, below of=pp, yshift=-7cm] {Phase 5};
\node (ver) [cloud, below of=bt, yshift=-2.5cm, xshift=5cm] {Phase 6};

\end{tikzpicture}
\caption{Process Flow}
\label{pic:flow}
\end{center}
\end{figure}
\end{document}

答案1

我真的怀疑你写的代码是否是为了画那幅图,因为创建一堆你从不使用的样式、过时的语法和你不想要的颜色是没有意义的。(所以我怀疑代码是否真的来自一些未被承认的来源。)

有流程图包,所以您应该研究一下它们。

\documentclass[border=10pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows,arrows.meta,positioning,shapes.geometric}

\begin{document}
\begin{tikzpicture}
  [
    node distance=2cm,
    >=Latex,
    cbr/.style={text centered, draw=black, minimum height=1cm, rounded corners, minimum width=3cm, text width=15em, },
  ]
  \begin{scope}[local bounding box=c]
    \draw (-.5,-.75) coordinate (a) [out=-30, in=120] to (.5,-.75) |- (-.5,.75) coordinate [midway] (b) -- cycle ;
    \clip  (a) |- (b) -- ++(0,1) -- ++(-2,0) |- cycle ;
    \begin{scope}[shift=(135:.25)]
      \draw (-.5,-.75) coordinate (a1) [out=-30, in=120] to (.5,-.75) |- (-.5,.75) coordinate [midway] (b1) -- cycle ;
    \end{scope}
    \clip  (a1) |- (b1) -- ++(0,1) -- ++(-2,0) |- cycle ;
    \begin{scope}[shift=(135:.5)]
      \draw (-.5,-.75) coordinate (a2) [out=-30, in=120] to (.5,-.75) |- (-.5,.75) coordinate [midway] (b2) -- cycle ;
    \end{scope}
  \end{scope}
  \foreach \i [count=\j] in {60,120,...,360}
  {
    \node (p\j) [cbr] at (\i:7) {Phase \j};
    \draw [<->] (p\j) -- (c);
  }
  \foreach \i/\j [remember=\i as \ilast (initially 6) ] in {1,...,6}
  {
    \pgfmathor{\i==1}{\i==4}\ifnum\pgfmathresult=1\draw  [<->, densely dotted] (p\ilast) |- (p\i);
    \else\pgfmathor{\i==2}{\i==5}\ifnum\pgfmathresult=1\draw  [<->, densely dotted] (p\ilast) -- (p\i);
    \else\draw [<->, densely dotted] (p\ilast) -| (p\i);
    \fi\fi
  }
  \node (w) [right=of p6, double arrow, draw, text width=20mm, text centered] {Arrow};
  \node [right=of w, draw, cylinder, shape border rotate=90,  anchor=center, minimum width=15mm, minimum height=30mm] {Drum};
\end{tikzpicture}
\end{document}

流动

相关内容