How can I make the nodes connected without any block using Tikz? For example, I was trying to connect the arrows that returns to the do-loop when the decision making box (named as Condn) returns no. However, you can see in the Latex code below that the two arrows are disconnected! Any help?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows, shadows}
\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30, drop shadow]
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30]
\tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
\tikzstyle{line} = [draw, -latex']
\begin{document}
\begin{tikzpicture}[node distance=2cm]
\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] {Condn};
%\node (pro2b) [process, right of=dec1, xshift=2cm] {};
\node (pro2b) [arrow, right of=dec1, xshift=3cm] {};
\node (out1) [io, below of=dec1] {Output};
\node (stop) [startstop, below of=out1] {Stop};
\draw [arrow] (start) -- (in1);
\draw [arrow] (in1) -- (pro1);
\draw [arrow] (pro1) -- (dec1);
\draw [arrow] (dec1) -- node[anchor=west] {yes} (out1);
\draw [arrow] (dec1) -- node[anchor=south] {no} (pro2b);
\draw [arrow] (pro2b) |- (pro1);
% \path[-,draw] (dec1) -| node{} (inv.north);
% \path[line]{} (inv.north) |- node[above]{no} (pro1);
\draw [arrow] (dec1) -- (out1);
\draw [arrow] (out1) -- (stop);
\end{tikzpicture}
\end{document}
I am attaching my output as well (Modified after a sample code found online).
Best Answer
There are various solutions to this problem. You can draw the path completely inserting an empty node with the label above:
so that the whole picture draws like this: