Search

tikz for flow charts


\documentclass{article}

\usepackage{tikz}

\usetikzlibrary{shapes,shadows,arrows}

\usetikzlibrary{backgrounds}

\begin{document}

%line thickness styles: ultra thin, very thin, (thin), semithick, thick, very thick, ultra thick

%line dash styles: loosely dashed, densely dashed, loosely dotted, densely dotted

\tikzstyle{decision}=[diamond,draw,fill=gray!50]

%\tikzstyle{arrow}=[draw,-latex’,very thick]

\tikzstyle{arrow}=[draw,-latex’]

\tikzstyle{line}=[draw]

\tikzstyle{cloud}=[draw=gray!0,very thick,block,rounded corners,fill=gray!2, minimum width=15mm, minimum height=15mm,node distance=5em]

\tikzstyle{vagueblock}=[draw=gray!30,rectangle,rounded corners,fill=gray!30,text centered, minimum width=15mm, minimum height=15mm,node distance=5em]

\tikzstyle{block}=[draw,rectangle,rounded corners,fill=gray!30,text centered, minimum width=15mm, minimum height=15mm,node distance=5em]

\tikzstyle{empblock}=[draw,rectangle,rounded corners,minimum width=8cm,minimum height=5cm]

\tikzstyle{grayblock}=[draw,fill=gray!30,rectangle,rounded corners,minimum width=7.5cm,minimum height=4.5cm]

\begin{tikzpicture}

%shapes

\node[vagueblock](AAA){\parbox{7cm}{\centering Abdominal aorta aneurysm patients \\Patients=355}};

\node[block,below of=AAA,xshift=2cm,yshift=-1cm](AAAfu){\parbox{3cm}{\centering Follow-up patients \\ Patients=149}};

\node[block,below of=AAA,xshift=-2cm,yshift=-1cm](AAAop){\parbox{3cm}{\centering Post-op patients\\ Patients=206}};

%\node[empblock,below of=AAA,yshift=-0.4cm](emp){};

\begin{scope}[on background layer]

\node[grayblock,below of=AAA,yshift=-0.4cm](emp){};

\end{scope}

\node[block,left of=AAA,xshift=-5cm](Controls){\parbox{4cm}{\centering Healthy controls \\Patients=196}};

\node[cloud,below of=Controls,yshift=-1cm](TCC){\parbox{4cm}{\centering Nested case-control\\ Endpoint: TCC}};

\node[cloud,above of=Controls,yshift=1cm](C4BP){\parbox{4cm}{\centering Nested case-control\\ Endpoint: C4BP}};

\node[cloud,above of=AAA,yshift=1cm](size){\parbox{7cm}{\centering Retroperspective\\ Endpoint: Aneurysm size}};

\node[cloud,below of=AAA,yshift=-4cm](followup){\parbox{7cm}{\centering Follow-up study \\ Endpoints: Survival, aneurysm size, C4BP}};

\path[arrow](size) — (emp);

\path[arrow](TCC)–(AAAop);

\path[arrow](TCC)–(Controls);

\path[arrow](C4BP)–(emp);

\path[arrow](C4BP)–(Controls);

\path[arrow](followup)–(AAAfu);

\end{tikzpicture}

\end{document}

0 views

Recent Posts

See All

©2020 by Danish Institute for Data Science. Proudly created with Wix.com