Graphics, Figures & TablesDashed separating Line in Flowchart

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Pherdvang
Posts: 1
Joined: Fri Jun 07, 2013 11:40 am

Dashed separating Line in Flowchart

Post by Pherdvang »

Hi everyone,

I'm fairly new to TikZ/PGF, but I've worked out a simple flowchart. I would now like to separate this flowchart with a line, so that I can write comments/other figures in a kind of parallel flowchart.

Here's my code.

Code: Select all

\tikzstyle{decision}=[
  diamond,
  draw,
  fill=blue!20,
  text width=4.5em,
  text badly centered,
  node distance=3cm,
  inner sep=0pt
]
\tikzstyle{block}=[
  rectangle,
  draw,
  fill=blue!20,
  text width=5em,
  text centered,
  rounded corners,
  minimum height=4em
]
\tikzstyle{line}=[
  draw,
  -latex'
]
\tikzstyle{cloud}=[
  draw,
  ellipse,
  fill=red!20,
  node distance=3cm,
  minimum height=2em
]

\begin{tikzpicture}[node distance=2cm,auto]
  \node [block] (init) {initialize model};
  \node [cloud,left of=init] (expert) {expert};
  \node [cloud,right of=init] (system) {system};
  \node [block,below of=init] (identify) {identify candidate models};
  \node [block,below of=identify] (evaluate) {evaluate candidate models};
  \node [block,left of=evaluate,node distance=3cm] (update) {update model};
  \node [decision,below of=evaluate] (decide) {is best candidate better?};
  \node [block,below of=decide,node distance=3cm] (stop) {stop};

  \path [line] (init) -- (identify);
  \path [line] (identify) -- (evaluate);
  \path [line] (evaluate) -- (decide);
  \path [line] (decide) -| node [near start] {yes} (update);
  \path [line] (update) |- (identify);
  \path [line] (decide) -- node {no}(stop);
  \path [line,dashed] (expert) -- (init);
  \path [line,dashed] (system) -- (init);
  \path [line,dashed] (system) |- (evaluate);
\end{tikzpicture}
A small picture of what I mean is attached. I hope you can help me.


Regards,
Frederik.
Attachments
flowchart.jpg
flowchart.jpg (50.9 KiB) Viewed 4347 times
Last edited by localghost on Fri Jun 07, 2013 4:14 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Dashed separating Line in Flowchart

Post by localghost »

For an adequate problem description kindly prepare a self-contained and minimal example.


Best regards and welcome to the board
Thorsten
Post Reply