Guest User

Untitled

a guest
May 24th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. \documentclass{standalone}
  2. \usepackage{tikz}
  3. \usetikzlibrary{shapes.misc, positioning, backgrounds, fit}
  4.  
  5. \begin{document}
  6.  
  7. \begin{tikzpicture}[node distance=1 and 1]
  8. \draw[help lines, very thin] (-1,-3) grid (5, 1);
  9. % Drawing boxes left aligned
  10. \node at (0,0) [rectangle,white,fill=red] (D) {D};
  11. \node [rectangle,white,fill=blue,below=of D.west,anchor=west] (E) {EFGH};
  12. \node [rectangle,white,fill=blue,anchor=south,on grid, below=of E.west,anchor=west] (F) {RST};
  13.  
  14. % Drawing boxes center aligned
  15. \node at (2,0) [rectangle,white,fill=red] (A) {A};
  16. \node [rectangle,white,fill=blue,on grid, below=of A] (B) {BCD};
  17. \node [rectangle,white,fill=blue,on grid, below=of B] (C) {PQRS};
  18.  
  19. % Drawing boxes right aligned
  20. \node at (4,0) [rectangle,white,fill=red] (G) {G};
  21. \node [rectangle,white,fill=blue,on grid, below=of G.east,anchor=east] (H) {EFGH};
  22. \node [rectangle,white,fill=blue,anchor=south,below=of H.east,anchor=east] (F) {RST};
  23. \end{tikzpicture}
  24.  
  25. \end{document}
Add Comment
Please, Sign In to add comment