2

Is it possible to do this kind of plotting with matplotlib? Or somewhat close?

I know fill can be used but the block texture I am not sure of.

Thanks.

]

Paul H
  • 65,268
  • 20
  • 159
  • 136
user730936
  • 139
  • 1
  • 8
  • This isn't a heatmap, the rectangles are proportional to the size of the object, in a heatmap the "size" correlates to the color. Incidentally it may be useful to know this comes from http://windirstat.info/. – Hooked Jan 14 '14 at 22:35

1 Answers1

1

These types of plots are called Treemaps.

A Treemap is a space-constrained visualization of hierarchical structures. It is very effective in showing attributes of leaf nodes using size and color coding. Treemap enables users to compare nodes and sub-trees even at varying depth in the tree, and help them spot patterns and exceptions.

They are recursively built, so posting a complete example would be difficult. A small cookbook recipe for Treemaps using matplotlib can be found here.

Related questions:

Python graph like windirstat?

Treemap visualization in Python

Community
  • 1
  • 1
Hooked
  • 84,485
  • 43
  • 192
  • 261