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.

I want draw something like this:

enter image description here

And this is what I am getting:

enter image description here

I am facing three difficulties:

  1. How to get bullets inside a block? and how to use different font for the same?
  2. How to draw these rest of the arrows.
  3. How to get three circle below arr2 shown in the figure?

This is my tikz code:

\documentclass[a4paper,10pt]{article}
%\documentclass[a4paper,10pt]{scrartcl}
\usepackage{tikz}
\usetikzlibrary{shapes}
\usetikzlibrary{positioning,arrows}
\usepackage[utf8x]{inputenc}
\usepackage{scalefnt}

\begin{document}


\begin{tikzpicture}[fill=blue,ultra thick, scale = 0.75, transform shape,font=\Large]


\node[rectangle] (a1) [draw, minimum width=3.5cm,minimum height=2.5cm] {device $1$};
\node[rectangle] (a2) [draw, minimum width=3.5cm,minimum height=2.5cm,below of=a1,node distance=4cm] {device $2$};
\node[rectangle] (a3) [draw, minimum width=3.5cm,minimum height=2.5cm,below of=a2,node distance=4cm] {device $3$};

\coordinate[right=5.5cm of a1] (a4)  {};

\node[rectangle split , rectangle split horizontal] (a5)[draw, minimum height=1cm,inner sep=0.5 cm, above of=a4,node distance=0.6cm] {arr$1$ \nodepart{two} arr$2$ \nodepart{three} arr$3$ \nodepart{four} arr$N$};
\coordinate[below=1.5cm of a5] (a6)  {};
\node[rectangle] (b1) [draw, minimum width=2.5cm,minimum height=1cm,left of=a6,node distance=0.5cm] {BB$0$};
\node[rectangle] (b2) [draw, minimum width=2.5cm,minimum height=1cm,below of=b1,node distance=2cm] {BB$1$};
\node[rectangle] (b3) [draw, minimum width=2.5cm,minimum height=1cm,below of=b2,node distance=2cm] {BB$2$};

\node[rectangle] (b4) [draw, minimum width=2.5cm,minimum height=1cm,right of=b1,node distance=6cm] {BB$0$};
\node[rectangle] (b5) [draw, minimum width=2.5cm,minimum height=1cm,below of=b4,node distance=2cm] {BB$1$};

\node[rectangle] (b6) [draw, minimum width=7cm,minimum height=3.5cm,below of=b5,node distance=2.5cm] {dimension \\ bounds in each dim };
\coordinate[right=4cm of a3] (a6)  {};

\node[rectangle] (b7) [draw, minimum width=2.5cm,minimum height=1cm,below of=a6,node distance=0.75cm] {BB$3$};
\node[rectangle] (b8) [draw, minimum width=2.5cm,minimum height=1cm,right of=b7,node distance=4cm] {BB$4$};
\node[rectangle] (b9) [draw, minimum width=2.5cm,minimum height=1cm,right of=b8,node distance=4cm] {BB$5$};



\path[->] (a1) edge node {} (a2);
\path[->] (a2) edge node {} (a3);

\path[->] (a1.18.5) edge node {} (a5);
\path[->] (b7) edge node {} (b8);
\path[->] (b8) edge node {} (b9);

\end{tikzpicture}

\end{document}
share|improve this question

1 Answer 1

up vote 9 down vote accepted

Bullets

To place the bullets, I would just \draw a circle at the appropriate points. For multi part split rectangle you can access the second part, for instance, as a5.two. We want below the second part's south so you can use:

\draw [blue]  ($(a5.two south)+(0,-0.5cm)$)   circle (4pt);

Here I have used tikz's calc library to shift the location (0,-0.5cm) from a5.two south. The brown node is placed similarly using (a5.three south). To place the red node I compute midpoint between (a5.two south) and (a5.three south) using (a5.two south)!0.5!(a5.three south) and then shift it vertically as well. So, the complete code for the "bullets" is:

\coordinate (midway) at ($(a5.two south)!0.5!(a5.three south)+(0,-0.5cm)$);
\draw [blue]  ($(a5.two south)+(0,-0.5cm)$)   circle (4pt);
\draw [red]   (midway)                        circle (4pt);
\draw [brown] ($(a5.three south)+(0,-0.5cm)$) circle (4pt);

Font Change:

One way to change the font is to use

 font=\Large\bfseries

I also added To get the text centered and use the \\ you can add align=center.

Bulleted Node Content

Since you want to use a list like environment in a node you can put the node content within an \parbox and use the itemize environment and apply any font changes as you would outside of a tikzpicture:

\parbox{6.5cm}{\color{blue}%
\begin{itemize}
    \item dimension
    \item bounds in each dim 
\end{itemize}%
}

Arrows:

I used

\draw [ultra thick, blue, ->] 
    (a1.east) -- 
    ($(a1.east)+(0.5cm,0)$) |- (b7.west);

to draw one of the arrows.

enter image description here

References:

Code:

\documentclass[a4paper,10pt]{article}
%\documentclass[a4paper,10pt]{scrartcl}
\usepackage{tikz}
\usetikzlibrary{shapes}
\usetikzlibrary{positioning,arrows,calc}
%\usepackage[utf8x]{inputenc}
\usepackage{scalefnt}

\begin{document}


\begin{tikzpicture}[fill=blue,ultra thick, scale = 0.75, transform shape,font=\Large]


\node[rectangle] (a1) [draw, minimum width=3.5cm,minimum height=2.5cm] {device $1$};
\node[rectangle] (a2) [draw, minimum width=3.5cm,minimum height=2.5cm,below of=a1,node distance=4cm] {device $2$};
\node[rectangle] (a3) [draw, minimum width=3.5cm,minimum height=2.5cm,below of=a2,node distance=4cm] {device $3$};

\coordinate[right=5.5cm of a1] (a4)  {};

\node[rectangle split , rectangle split horizontal] (a5)[draw, minimum height=1cm,inner sep=0.5 cm, above of=a4,node distance=0.6cm]  {arr$1$ \nodepart{two} arr$2$ \nodepart{three} arr$3$ \nodepart{four} arr$N$};
\coordinate[below=1.5cm of a5] (a6)  {};
\node[rectangle] (b1) [draw, minimum width=2.5cm,minimum height=1cm,left of=a6,node distance=0.5cm] {BB$0$};
\node[rectangle] (b2) [draw, minimum width=2.5cm,minimum height=1cm,below of=b1,node distance=2cm] {BB$1$};
\node[rectangle] (b3) [draw, minimum width=2.5cm,minimum height=1cm,below of=b2,node distance=2cm] {BB$2$};

\node[rectangle] (b4) [draw, minimum width=2.5cm,minimum height=1cm,right of=b1,node distance=6cm] {BB$0$};
\node[rectangle] (b5) [draw, minimum width=2.5cm,minimum height=1cm,below of=b4,node distance=2cm] {BB$1$};

\node[rectangle] (b6) [draw, minimum width=7cm,minimum height=3.5cm,below of=b5,node distance=2.5cm,font=\Large\bfseries,align=center] {%
\parbox{6.5cm}{\color{blue}%
\begin{itemize}
    \item dimension
    \item bounds in each dim 
\end{itemize}
}
};
\coordinate[right=4cm of a3] (a6)  {};

\node[rectangle] (b7) [draw, minimum width=2.5cm,minimum height=1cm,below of=a6,node distance=0.75cm] {BB$3$};
\node[rectangle] (b8) [draw, minimum width=2.5cm,minimum height=1cm,right of=b7,node distance=4cm] {BB$4$};
\node[rectangle] (b9) [draw, minimum width=2.5cm,minimum height=1cm,right of=b8,node distance=4cm] {BB$5$};



\path[->] (a1) edge node {} (a2);
\path[->] (a2) edge node {} (a3);

\path[->] (a1.18.5) edge node {} (a5);
\path[->] (b7) edge node {} (b8);
\path[->] (b8) edge node {} (b9);

\coordinate (midway) at ($(a5.two south)!0.5!(a5.three south)+(0,-0.5cm)$);
\draw [blue]  ($(a5.two south)+(0,-0.5cm)$)   circle (4pt);
\draw [red]   (midway)                        circle (4pt);
\draw [brown] ($(a5.three south)+(0,-0.5cm)$) circle (4pt);

\draw [ultra thick, blue, ->] 
        (a1.east) -- 
        ($(a1.east)+(0.5cm,0)$) |- (b7.west);

\end{tikzpicture}

\end{document}
share|improve this answer
1  
For "bulleted node content", you can use an itemize environment into a node with text width option instead of \parbox. –  Paul Gaborit Jan 30 '13 at 7:35
    
@PaulGaborit: Good point. But for some reason it is resulting in a vertical shift when I specify text width=6.5cm and comment out the \parbox. Will have to look into it tomorrow. –  Peter Grill Jan 30 '13 at 8:16

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.