I'm trying to make a diagram that shows relations of elements in a system, but I don't know how to layer anything.
So far I've got:
\documentclass{book}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning}
\begin{document}
\tikzstyle{narrow} = [draw, fill=blue!20, text width=2cm, text centered, minimum height=1cm]
\tikzstyle{wide} = [draw, fill=orange!20, text width=7.5cm, text centered, minimum height=1.75cm, rounded corners]
\tikzstyle{tall} = [draw, fill=green!20, text width=1.75cm, text centered, minimum height=7cm, rounded corners]
\tikzstyle{squar} = [draw, fill=yellow!10, text width=4.75cm, text centered, minimum height=3.75cm, rounded corners]
\def\blockdist{5}
\def\edgedist{5}
\begin{tikzpicture}
\node (lib) [tall] {Library};
\node at (3,-1) (tman) [narrow] {tmon};
\node (ksman) [narrow] [right=.75cm of tman] {ksmon};
\node (stsp) [narrow] [right=.75cm of ksman] {stosp};
\node (deamon) [wide] [below=.75cm of ksman] {base};
\node (imgan) [narrow] [above=.75cm of tman] {img-analysis};
\node (thrman) [narrow] [above=.75cm of imgan] {thermal-analysis};
\node (scrpts) [squar] [right=.75cm of thrman] {Scripts};
\end{tikzpicture}
\end{document}
There are three things I'm trying to accomplish:
- How can I put a box around/behind the "ksmon" and "stosp" nodes?
- How can I put a box around/behind the one created above and the "tmon" node?
- How can I put nodes in/on top of the "Scripts" nodes?
