Drawing Trees and Graphs

With nodes, edges, and styles, we can already build complex pictures. To make our work easier, TikZ provides libraries with support for various common types of graphics.

Each library provides specific drawing commands and corresponding style options.

In this chapter, you will learn to work with TikZ libraries for the following topics:

  • Drawing trees
  • Creating mind maps
  • Producing graphs
  • Positioning in a matrix

By the end of the chapter, you will be able to efficiently produce such types of graphics.

Technical requirements

Apart from your local LaTeX installation, you can work with the code at https://tikz.org/chapter-06 or use Overleaf for online compiling.

The code examples are available on GitHub at https://github.com/PacktPublishing/LaTeX-graphics-with-TikZ/tree/main/06-drawing-trees-graphs-charts ...

Get LaTeX Graphics with TikZ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.