Presentations and PostersReturning arrows drawing (Tikz : Beamer)

Beamer, Powerdot and KOMA-Script presentations, Conference posters (a0poster, baposter, tikzposter)
Post Reply
ss_88_ss
Posts: 1
Joined: Mon Jun 24, 2019 9:46 am

Returning arrows drawing (Tikz : Beamer)

Post by ss_88_ss »

Hello everyone,

I am using Tikz over Beamer.

I am creating a flowchart which i post the code herein :

Code: Select all

\begin{tikzpicture}[node distance=0.95cm] 

\node (start) [startstop] {Start};
\node (in1) [io, below of=start] {Input};
\node (pro1) [process, below of=in1] {Process 1}; 
\node (dec1) [decision, below of=pro1, yshift=-0.5cm] {Decision 1};
\node (dec2) [decision, below of=dec1, yshift=-0.5cm] {Decision 2};
\node (pro2b) [process, right of=dec1, xshift=2cm] {Process 2b};
\node (pro2d) [process, left of=dec1, xshift=-2cm] {Process 2d};
\node (pro2e) [process, below of=pro2d, yshift=-0.15cm] {Process 2e};
\node (pro2c) [process, below of=pro2b, yshift=-0.15cm] {Process 2c};
\node (out1) [io, below of=dec2] {Output}; 
\node (stop) [startstop, below of=out1] {Stop};

\draw [arrow] (start) -- (in1); 
\draw [arrow] (in1) -- (pro1); 
\draw [arrow] (pro1) -- (dec1); 
\draw [arrow] (dec1) -- (dec2);
\draw [arrow] (dec1) -- (pro2b);

\draw [arrow] (dec1) -- node[anchor=east] {yes} (dec2); 
%\draw [arrow] (dec1) -- node[anchor=south] {no} (pro2b);
%\draw [arrow] (dec2) |- (pro1);
\draw[arrow] (dec2.west) -| node[auto] {Yes} ++(2pt,2pt)  |- (pro1.west);
%\path [line, red, thick] (dec2.west) --     ([xshift=0.5cm]dec2.west) --     ([xshift=0.5cm]pro1.west) --     (pro1.west);
\draw [arrow] (dec2) -- (out1); 
\draw [arrow] (out1) -- (stop);
\draw [arrow] (pro2b) |- (pro1);

\end{tikzpicture}



Now the problem is one returning arrow from node DECISION 2 to PROCESS 1 that is not drawed properly (i want to to go all left passing PROCESS2d and PROCESS2e and up to PROCESS1)

I attach what i have described i have drawed.

Could you help ?

Best ,
ask3.JPG
ask3.JPG (42.52 KiB) Viewed 61047 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Returning arrows drawing (Tikz : Beamer)

Post by Stefan Kottwitz »

As I stumbled across this topic, here's a way:

Code: Select all

\draw[->] (dec2.west) -- ++(-4cm,0) |- node[near start, left] {Yes} (pro1.west);
All the user defined styles are missing, but if I remove or replace them the code can be tested:

Code: Select all

\begin{tikzpicture}[node distance=0.95cm] 

\node (start) {Start};
\node (in1) [below of=start] {Input};
\node (pro1) [below of=in1] {Process 1}; 
\node (dec1) [below of=pro1, yshift=-0.5cm] {Decision 1};
\node (dec2) [below of=dec1, yshift=-0.5cm] {Decision 2};
\node (pro2b) [right of=dec1, xshift=2cm] {Process 2b};
\node (pro2d) [left of=dec1, xshift=-2cm] {Process 2d};
\node (pro2e) [below of=pro2d, yshift=-0.15cm] {Process 2e};
\node (pro2c) [below of=pro2b, yshift=-0.15cm] {Process 2c};
\node (out1) [below of=dec2] {Output}; 
\node (stop) [below of=out1] {Stop};

\draw [->] (start) -- (in1); 
\draw [->] (in1) -- (pro1); 
\draw [->] (pro1) -- (dec1); 
\draw [->] (dec1) -- (dec2);
\draw [->] (dec1) -- (pro2b);

\draw [->] (dec1) -- node[anchor=east] {yes} (dec2); 
%\draw [arrow] (dec1) -- node[anchor=south] {no} (pro2b);
%\draw [arrow] (dec2) |- (pro1);
%\path [line, red, thick] (dec2.west) --     ([xshift=0.5cm]dec2.west) --     ([xshift=0.5cm]pro1.west) --     (pro1.west);
\draw [->] (dec2) -- (out1); 
\draw [->] (out1) -- (stop);
\draw [->] (pro2b) |- (pro1);
\draw[->] (dec2.west) -- ++(-4cm,0) |- node[near start, left] {Yes} (pro1.west);
\end{tikzpicture}
Stefan
LaTeX.org admin
Post Reply