# Treemap

Treemap

A treemap turns a tree in graph theory into a planar space-filling map: the root is the outermost rectangle, whose nodes are the rectangles at level one, and so on down the levels.

Treemaps visually display a hierarchical structure by dividing a rectangular area in proportion to the values of the tree nodes. Treemaps were invented by Ben Shneiderman in 1990.

This Demonstration uses a splice and dice algorithm with a split parameter determining when to switch reducing the axis or the axis of the remaining rectangular area. The tree depth here is four—you control how many branching levels are visible—and consists of six randomly generated values at each node.

x

y