All examples By author By category About

rpgove

Spiral Treemap

A treemap recursively subdivides area into rectangles; the area of any node in the tree corresponds to its value. This example uses color to encode the order of several perfect squares (the children of each perfect square are the nonzero digits of that perfect square). Treemap design invented by Ben Shneiderman. Spiral treemap algorithm by Tu and Shen.

The spiral treemap layout has several benefits: It preserves the order of the nodes in the tree, and it maintains a good average aspect ratio (close to the golden ratio in this example).