Growing a tree
A widespread type of hierarchical graph is a tree. Tree nodes have children connected by edges, usually displayed in rows when growing down or in columns when growing horizontally.
How to do it...
We will use basic TikZ without extra packages. Follow these steps:
- Start with a document class:
\documentclass{article}
- Load the tikz package:
\usepackage{tikz}
- Start the document:
\begin{document}
- Begin with a TikZ picture, and specify options for it:
\begin{tikzpicture}[sibling distance=10em, every node/.style = {shape=rectangle, rounded corners, draw, align=center, top color=white, bottom color=blue!20}]]
- Draw a node and add children to it:
\node {Formulas} child { node {single-line} } child { node {multi-line} child { node {aligned at} child {...