I have the following flowchart:
To draw this in Latex, I have written the following:
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\begin{document}
\pagestyle{empty}
% Define block styles
\tikzstyle{block} = [rectangle, draw, text width=5.5em, text centered, minimum height=4em]
\tikzstyle{line} = [draw, -latex']
\begin{tikzpicture}[node distance = 2.5cm, auto]
% Place nodes
\node [block] (init) {Statement};
\node [block, below of=init] (asVl) {Assisgnment\\by-value};
\node [block, left of=asVl] (cons) {Constructor};
\node [block, right of=asVl] (asRt) {Assisgnment\\by-return};
\node [block, below of=asRt] (d2) {dependent\\(dependee)};
\node [block, left of=d2] (d1) {dependee};
\node [block, right of=d2] (d3) {dependent\\(not dependee)};
\node [block, below of=d3] (red) {redundant};
\node [block, left of=red] (nonred) {non-redundant};
\node [block, below of=nonred] (noRem) {Statement cannot be removed};
\node [block, right of=noRem] (rem) {Statement can be removed};
% Draw edges
\path [line] (init) -- (cons);
\path [line] (init) -- (asVl);
\path [line] (init) -- (asRt);
\path [line] (asRt) -- (d1);
\path [line] (asRt) -- (d2);
\path [line] (asRt) -- (d3);
\path [line] (d3) -- (red);
\path [line] (d3) -- (nonred);
\path [line] (red) -- (rem);
\path [line] (cons) -- (noRem);
\path [line] (asVl) -- (noRem);
\path [line] (d1) -- (noRem);
\path [line] (d2) -- (noRem);
\path [line] (nonred) -- (noRem);
\end{tikzpicture}
\end{document}
This generates the following flowchart:
There are some issues with this flowchart: First, how can I make the lines connecting the boxes straight as in the above chart? (there is a horizontal line to connect between each box in top with boxes in bottom). Second, I struggled to put the labels in the left (Type, Dependency, and Redundancy). Third, how can I extend the last box (Statement cannot be removed) to be exactly like the size in the above chart?
Do you have any suggestions of how to solve these issues?