How to create a complex flowchart in LaTeX?
An example problem below, which is also illustrated (coded) in an intuitive manner, provides ideas on how to draw complex flow diagrams having a variety of arrows (turning and curving), shapes, trees, and colors using TikZ in LaTeX.
How to draw the flow diagram shown here in LaTeX?
\begin{tikzpicture} [ arrow/.style={->, very thick}, block/.style={rectangle, fill=lightgray!1,draw=black, thin, text centered, rounded corners=0pt, minimum height=1em}, node distance=1cm ]
\draw[very thick,gray!90,rounded corners=8pt] (0,-0.5) – – (15.5,-0.5) – – (15.5,11) – – (0.,11) – – cycle; % the outline
\node (rect1) at (5,10) [block] {Level 1};
\node (rect2) at (5,9) [block] {Level 2};
\node (rect3) at (5,8) [block] {Level 3};
\node (rect4) at (5,6) [block,fill=lightgray!50] {Level 4};
\node (rect5) at (5,4) [block] {Level 5};
\node (rect6) at (10,7) [block,fill=yellow!50] {Level Side};
\node (rect7) at (12,6) [block] {Side 1};
\node (rect8) at (12,5) [block] {Side 2};
\node (rect9) at (12,4) [block] {Side 3};
\node (rect10) at (10,3) [block] {Side 31};
\node (rect11) at (14,3) [block] {Side 32};
\node (rect12) at (5,2) [block] {Level $\Sigma_{\alpha \beta \gamma}$};
\node (rect13) at (5,0.5) [block] {Level 7};
\draw[arrow,red] (node cs:name=rect6,anchor=west) .. controls (8,7) and (8,6) ..(rect4); % the curved arrow
\draw [arrow] (rect1) – – (rect2);
\draw [arrow] (rect2) – – (rect3);
\draw [arrow] (rect3) – – (rect4);
\draw [arrow] (rect4) – – (rect5);
\draw [arrow] (rect5) – – (rect12);
\draw [arrow] (rect12) – – (rect13);
\draw [arrow,<-,red] (rect6) – – (10,6) – – (rect7); % side 1 to level side (rect 7 to 6)
\draw [arrow,<-,red] (rect6) – – (10,5) – – (rect8);
\draw [arrow,<-,red] (rect6) – – (10,4) – – (rect9);
\draw [arrow,<-,red] (10.6,4) – – (rect9);
\draw [arrow,<-,red] (10.6,5) – – (rect8);
\draw [arrow,<-,red] (10.6,6) – – (rect7);
\draw[arrow] (node cs:name=rect3,anchor=west) – – (1,8) – – (1,4) – – (rect5) ;
\draw[arrow, <-, red] (node cs:name=rect9,anchor=south) – – (12,3) – – (rect10) ;
\draw[arrow, <-, red] (node cs:name=rect9,anchor=south) – – (12,3) – – (rect11) ;
\end{tikzpicture}