LaTeX Horizontal Flowchart (Workflow)

Source: https://tex.stackexchange.com/questions/368482/one-horizontal-line-flow-chart?rq=1

Just found an excellent source on how to draw a simple (slightly fanciful) horizontal flowchart using LaTeX (TikZ).

The output is very neat:

The code is reproduced here (in case the original source gets deleted):

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{arrows.meta,
                chains,
                positioning,
                shapes.geometric
                }
% for fancy looks of data storages
\begin{document}
    \begin{tikzpicture}[
    node distance = 5mm and 7mm,
      start chain = going right,
 disc/.style = {shape=cylinder, draw, shape aspect=0.3,
                shape border rotate=90,
                text width=17mm, align=center, font=\linespread{0.8}\selectfont},
  mdl/.style = {shape=ellipse, aspect=2.2, draw},
  alg/.style = {draw, align=center, font=\linespread{0.8}\selectfont}
                    ]
    \begin{scope}[every node/.append style={on chain, join=by -Stealth}]
\node (n1) [disc] {Training\\ data};
\node (n2) [alg]  {Learning\\ algorithm};
\node (n3) [mdl]  {Model};
\node (n4) [disc] {Test\\ data};
\node (n3) [mdl]  {Accuracy};
    \end{scope}
\node[below=of n2]  {Step 1: Training};
\node[below=of n4]  {Step 2: Tresting};
    \end{tikzpicture}
\end{document}

About mathtuition88

http://mathtuition88.com
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.