TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm very new to TikZ. I would like to join some nodes as shown in the attached image

enter image description here

I've got some idea from this thread tree rectangular. However, I could not manage to implement this properly with the arrow. I would appreciate if you share your comments/suggestion to implement this.

share|improve this question
Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing what you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document. – Jubobs Nov 1 '13 at 23:39
@Jubobs thanks for your comment. Actually, I could only produced the three nodes at the left column, so was not sure if that'll be useful to show or not. But I got your point and I'll try to put my question with a MWE. – rana Nov 2 '13 at 9:06
up vote 7 down vote accepted

Complicate the coding to make it easier to understand.

    block/.style = {draw,rectangle,minimum size=1cm,rounded corners = 1ex,thick}}

%% first column
\node [block,draw=blue] (1a) {};
\node [block,draw=blue,below = 1cm of 1a] (1b) {};
\node [block,draw=blue,below = 1cm of 1b] (1c) {};
%% second column
\node [block,draw=green!70!blue,below right = 0cm and 2cm of 1a] (2a) {};
\node [block,draw=green!70!blue,below = 1cm of 2a] (2b) {};
%% paths
\draw[thick,magenta] (1a.-20) -| ([xshift=-1cm]2a.west)coordinate (a);
\draw[thick,magenta] (a) |- (1b.20);
\draw[thick,blue!60!green,-latex] (a) |- (2a.west);
\draw[thick,magenta] (1b.-20) -| ([xshift=-1cm]2b.west)coordinate (b);
\draw[thick,magenta] (b) |- (1c.20);
\draw[thick,blue!60!green,-latex] (b) |- (2b.west);


enter image description here

share|improve this answer
thanks for your reply. I could implement this in my code now. I was wondering if you are aware of any tutorial/site on TikZ for the beginners. – rana Nov 2 '13 at 11:08
@rana Go to texexample.net. You can use those to learn new stuff. :D – Alenanno Nov 2 '13 at 12:02
@rana: pgfmanual is the best resource. texdoc pgfmanual from command line/prompt. – Harish Kumar Nov 6 '13 at 22:07

An other alternative via matrix node from TiKZ

enter image description here



    line/.style={draw, thick},
    boxes/.style={draw, rectangle,
                thick,minimum height=2cm, rounded corners,
                minimum width=1cm, text=black, thick,
                text width=25mm,  align=center}
    % Place nodes
    \matrix[column sep=1cm, row sep=0.5cm]{
    \node [boxes,blue] (1a){}; &                    &                             \\
                               & \node[point](d){}  &\node[boxes,green] (3a){};   \\  
    \node [boxes,blue] (1b){}; &                    &                             \\
                               & \node[point](e){}; &\node[boxes,green] (3b){};   \\
    \node [boxes,blue] (1c){}; &                    &                             \\
    % Draw edges
    \path [line,magenta] ([shift={(0cm,-0.3cm)}]1a.east) -| (d) |- ([shift={(0cm,0.3cm)}]1b.east) ;
    \path [line, -latex',blue!60!green] (d.east) -- (3a.west);
    \path[line,magenta] ([shift={(0cm,-0.3cm)}]1b.east) -| (e) |- ([shift={(0cm,0.3cm)}]1c.east);
    \path [line, -latex',blue!60!green] (e.east) -- (3b.west);
share|improve this answer
thanks for your reply. I was not aware of this more structured format. – rana Nov 2 '13 at 11:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.