Graphics, Figures & TablesBranching Arrows with Decision Option in Flowchart

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mayankmi
Posts: 45
Joined: Sat Apr 20, 2013 7:52 pm

Branching Arrows with Decision Option in Flowchart

Post by mayankmi »

Hey,

I just want to bifurcate arrows with yes no options as shown in figure attached. My sample code is given below.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{arrows,trees}

\tikzstyle{intt}=[draw,text centered,minimum size=6em,text width=5.25cm,text height=0.34cm]
\tikzstyle{intl}=[draw,text centered,minimum size=2em,text width=2.75cm,text height=0.34cm]
\tikzstyle{int}=[draw,minimum size=2.5em,text centered,text width=3.5cm]
\tikzstyle{intg}=[draw,minimum size=3em,text centered,text width=6.cm]
\tikzstyle{sum}=[draw,shape=circle,inner sep=2pt,text centered, node distance=3.5cm]
\tikzstyle{summ}=[draw,shape=circle,inner sep=4pt,text centered, node distance=3.cm]

\begin{document}
  \begin{figure}[!htb]
    \centering
    \begin{tikzpicture}[
      node distance=1.25cm,
      auto,
      >=latex'
    ]
      \node [intg] (kp) {Is database of concrete clear cover available from construction drawings?};
      \node [int] (ki1) [below of=kp,yshift=-1cm,xshift=-2.25cm] {Use Jeffreys Prior, Eq xx};
      \node [int] (ki2) [below of=kp,yshift=-1cm,xshift=2.25cm] {Use Conjugate Prior, Eq yy};
      \node [intg] (ki3) [below of=kp,yshift=-2.75cm] {Find Posterior Parameters for population of concrete cover};
      \node [intg] (ki4) [below of=kp,yshift=-4.5cm] {Plot the posterior density function to help practitioner pick value of cc};

      \draw[->]  (kp) |- node[pos=0.25] {} (ki1);
      \draw[->]  (kp) |- node[pos=0.25] {} (ki2);
      \draw[->] (ki1) -- node[pos=0.25] {} (ki3);
      \draw[->] (ki2) -- node[pos=0.25] {} (ki3);
      \draw[->] (ki3) -- node[]         {} (ki4);
    \end{tikzpicture}
    \caption{Data Fusion system using Bayesian approach for updating Compressive strength $f_c$ in case of data from Literature and core compressive strength data for granite}
    \label{fig:datafusionindirectdirectfc}
  \end{figure}
\end{document}
Attachments
Screen Shot 2013-10-20 at 3.24.59 PM.png
Screen Shot 2013-10-20 at 3.24.59 PM.png (58.29 KiB) Viewed 7901 times
Last edited by localghost on Sun Oct 20, 2013 12:40 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Branching Arrows with Decision Option in Flowchart

Post by localghost »

You are probably searching for something like this. The example uses the libraries calc to calculate coordinates and positioning to position nodes individually. Please refer to the PGF/TikZ user guide for details. The output is attached.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{arrows,calc,positioning}

\tikzstyle{intt}=[draw,text centered,minimum size=6em,text width=5.25cm,text height=0.34cm]
\tikzstyle{intl}=[draw,text centered,minimum size=2em,text width=2.75cm,text height=0.34cm]
\tikzstyle{int}=[draw,minimum size=2.5em,text centered,text width=3.5cm]
\tikzstyle{intg}=[draw,minimum size=3em,text centered,text width=6.cm]
\tikzstyle{sum}=[draw,shape=circle,inner sep=2pt,text centered,node distance=3.5cm]
\tikzstyle{summ}=[drawshape=circle,inner sep=4pt,text centered,node distance=3.cm]

\begin{document}
  \begin{figure}[!htb]
    \centering
    \begin{tikzpicture}[
      >=latex',
      auto
    ]
      \node [intg] (kp)  {Is database of concrete clear cover available from construction drawings?};
      \node [int]  (ki1) [node distance=1.5cm and -1cm,below left=of kp] {Use Jeffreys Prior, Eq xx};
      \node [int]  (ki2) [node distance=1.5cm and -1cm,below right=of kp] {Use Conjugate Prior, Eq yy};
      \node [intg] (ki3) [node distance=5cm,below of=kp] {Find Posterior Parameters for population of concrete cover};
      \node [intg] (ki4) [node distance=2cm,below of=ki3] {Plot the posterior density function to help practitioner pick value of cc};

      \draw[->] (kp) -- ($(kp.south)+(0,-0.75)$) -| (ki1) node[above,pos=0.25] {Yes} ;
      \draw[->] (kp) -- ($(kp.south)+(0,-0.75)$) -| (ki2) node[above,pos=0.25] {No};
      \draw[->] (ki1) |- (ki3);
      \draw[->] (ki2) |- (ki3);
      \draw[->] (ki3) -- (ki4);
    \end{tikzpicture}
    \caption{Data Fusion system using Bayesian approach for updating Compressive strength $f_c$ in case of data from Literature and core compressive strength data for granite}
    \label{fig:datafusionindirectdirectfc}
  \end{figure}
\end{document}
Final adjustments are up to you.


Thorsten
Attachments
qtmp.png
qtmp.png (6.26 KiB) Viewed 7896 times
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply