Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{standalone}
- \usepackage{tikz}
- \usetikzlibrary{shapes.misc, positioning, backgrounds, fit}
- \begin{document}
- \begin{tikzpicture}[node distance=1 and 1]
- \draw[help lines, very thin] (-1,-3) grid (5, 1);
- % Drawing boxes left aligned
- \node at (0,0) [rectangle,white,fill=red] (D) {D};
- \node [rectangle,white,fill=blue,below=of D.west,anchor=west] (E) {EFGH};
- \node [rectangle,white,fill=blue,anchor=south,on grid, below=of E.west,anchor=west] (F) {RST};
- % Drawing boxes center aligned
- \node at (2,0) [rectangle,white,fill=red] (A) {A};
- \node [rectangle,white,fill=blue,on grid, below=of A] (B) {BCD};
- \node [rectangle,white,fill=blue,on grid, below=of B] (C) {PQRS};
- % Drawing boxes right aligned
- \node at (4,0) [rectangle,white,fill=red] (G) {G};
- \node [rectangle,white,fill=blue,on grid, below=of G.east,anchor=east] (H) {EFGH};
- \node [rectangle,white,fill=blue,anchor=south,below=of H.east,anchor=east] (F) {RST};
- \end{tikzpicture}
- \end{document}
Add Comment
Please, Sign In to add comment