5

I want to make Flowchart in the manner as shown in image,enter image description here

\documentclass{article}
\usepackage{tikz}
\usepackage[latin1]{inputenc}
\usetikzlibrary{shapes.geometric, arrows,backgrounds,fit,positioning}
\pagestyle{empty}

\tikzstyle{block} = [rectangle, draw, fill=blue!20, 
text width=4.2em, text centered, minimum height=3em]
%\tikzstyle{int}=[draw, fill=blue!20, minimum size=2em]
%\tikzstyle{init} = [pin edge={to-,thin,black}]
\tikzstyle{line} = [draw, -latex']
\begin{document}

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

% Place nodes
\node [block] (b1) {Title};
\node [block, left of= b1, node distance=2.3cm] (Input) {};
\node [block, right of= b1, node distance=2.3cm] (b2) {};
\node [block, right of= b2, node distance=2.3cm] (b3) {Title};

% Draw edges
\path [line] (Input) -- (b1) ;
\path [line] (b1) -- (b2);
\path [line] (b2) -- (b3) ;

\end{tikzpicture}
\end{document}
0

1 Answer 1

5

Here is a proposal. Note, however, that from your sketch it is not clear what you mean by the boxes in boxes, so I add two possibilities: using fit (which you already load) and \fbox.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
%\usepackage[latin1]{inputenc}
\usetikzlibrary{shapes.geometric, arrows,backgrounds,fit,positioning}
\pagestyle{empty}

\tikzset{block/.style={rectangle, draw, fill=blue!20, 
text width=4.2em, text centered, minimum height=3em},
line/.style={draw, -latex'},
int/.style={draw, fill=blue!20, minimum size=2em}}
%\tikzstyle{init} = [pin edge={to-,thin,black}]


\begin{document}
\begin{tikzpicture}
% Place nodes
\node[int] (i1) {text};
\node[int,below=2mm of i1] (i2) {text};
\node[int,below=2mm of i2] (i3) {text};
\node[int,below=2mm of i3] (i4) {text};
\node[below=2mm of i4] (title) {Title};
\node[fit=(i1) (i2) (i3) (i4) (title),draw,minimum width=2.4cm] (Input) {};

\node[block,left=2.3cm of Input] (b1) {Title};
\node[block,right=2.3cm of Input] (b2) {};
\node[block, right=2.3cm of b2,align=center] (b3) {Title\\
\fbox{text} \fbox{text} \fbox{text}};

% Draw edges
\path [line] (b1) -- (Input) ;
\path [line] (Input) -- node[above]{Text 1}
node[below,align=center]{$\left(\begin{array}{c}
\text{Text 2}\\ \text{Text 3}
\end{array}\right)$} 
(b2);
\path [line] (b2) -- (b3) ;

\end{tikzpicture}
\end{document}
2
  • The last node should have all 3 boxes aligned horizontally. Rest are fine. How to do align? Jul 28, 2018 at 8:14
  • @SatyamKumar You only need to increase the text width in this node accordingly, or use a different style without text width (but with align=center) for that.
    – user121799
    Jul 28, 2018 at 8:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .