Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This might be simple, but looks like a daunting task to me. The following is a portion of my flowchart roughly drawn in google drawing. The bubbles (actually dots) indicate that there is a continuation of frames. enter image description here How do I draw this in tikz? The choice of blue color for the block shapes was arbitrary.

share|improve this question
    
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. –  Jubobs Aug 20 '13 at 12:07
add comment

3 Answers

up vote 6 down vote accepted

Please try to include a MWE no matter how simple it is.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc,shapes.geometric}
\begin{document}
%
%
\begin{center}
\begin{tikzpicture}

\node[draw] (topnode) at (3,2) {Node A};
\node[draw] (botnode) at (3,-2) {Node B};
\foreach\x in {1,...,5}{
\node[draw,trapezium,trapezium left angle=120, trapezium right angle=60pt] (innernode\x)at (\x,0) {\x};
\draw (innernode\x) |- ($(innernode\x)!0.5!(topnode)$) -| (topnode);
\draw (innernode\x) |- ($(innernode\x)!0.5!(botnode)$) -| (botnode);
}


\end{tikzpicture}
\end{center}
%
%
\end{document}

enter image description here

share|improve this answer
add comment

There are many options here; I used the matrix. I also didn't elaborate to much on the code below. For example, if you need to calculate the intersections between lines, you must use the intersections library. You can also look in the PGF manual, it has lots of examples.

\documentclass[tikz]{standalone}

\usetikzlibrary{matrix}
\usetikzlibrary{shapes.geometric}
\usepackage{mathtools,ellipsis}


\begin{document}
\begin{tikzpicture}[%
    any/.style={%
        draw,
        shape=trapezium,
        trapezium left angle=60, trapezium right angle=120pt,
        fill=blue!50,
        minimum size=0.5cm,
        },
    topper/.style={%
        any,
        shape=rectangle,
        },
]

\matrix (somematrix) [%
    matrix of nodes,
    nodes=any,
    column sep=0.5cm,
    row sep=0.5cm,
    ]
{%
& |[topper] (n1)| Node A & & \\
|(n2)| Frame 1 & |(n3)| Frame 2 & |[draw=none,fill=none]| $\cdots$ & |(n4)| Frame N \\
& |[topper](n5)| Node B & & \\
};

\draw (n1) -- (n3) -- (n5)
      (n2) |- ++(0,0.5) -| (n4)
      (n2) |- ++(0,-0.5) -| (n4);
\end{tikzpicture}
\end{document}

enter image description here

share|improve this answer
    
is " | [topper] (n1) | Node A " same as "\node [topper] (n1) {Node A}; " ?? –  dineshdileep Jun 5 '13 at 4:19
    
Also could you explain "(n2) |- ++(0,0.5) -| (n4)" ?? I am not getting that "++" part. –  dineshdileep Jun 5 '13 at 4:20
    
@dineshdileep regarding your first question: yes, it is the same. But since I said matrix of nodes in the matrix options I can avoid always saying \node. For the second question, it works as the following: takes node named n2, goes up (x=0, y=0.5), then goes right, and finally goes down to meet the n4 node. The explanation of |-, -|, --, ++ can be easily found in the PGF manual. –  cacamailg Jun 5 '13 at 12:12
add comment

After some fiddling around, I got my own code working (am the questioner)

enter image description here

\documentclass[tikz,border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,shapes.geometric}
\begin{document}
%
%

\tikzset{
block/.style = {rectangle, draw, fill=blue!20, 
  text width=5em, text centered, minimum height=4em},
data/.style = {draw,trapezium,trapezium left angle=70,trapezium right angle=-70,minimum height=3em,fill=blue!20}  
}
%
%
\begin{tikzpicture}[]
\node [block] (nodeA) {Node A};
\node [below of=nodeA] (spreadout) {}; 
\matrix[
            row sep=0.3cm,column sep=0.5cm, below of=spreadout] (framematrix) {
        \node[data] (frame1){ Frame 1};&
        \node[data] (frame2){ Frame 2};&
        \node (dots1) {$\ldots$};&
        \node (dots1) {$\ldots$};&
        \node (dots1) {$\ldots$};&
        \node[data] (frameN){ Frame N};\\        
        };
\node [below of=framematrix] (spreadin) {};
\node [block,below of=spreadin] (nodeB) {nodeB};

\path [draw] (nodeA) --(spreadout);
\path [draw] (spreadout.north) -| (frame1);
\path [draw] (spreadout.north) -| (frame2);
\path [draw] (spreadout.north) -| (frameN);
\path [draw] (frame1) |- (spreadin.north);
\path [draw] (frame2) |- (spreadin.north);
\path [draw] (frameN) |- (spreadin.north);
\path [draw] (spreadin.north) -- (nodeB);
\end{tikzpicture}
\end{document}
share|improve this answer
add comment

Your Answer

 
discard

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.