A treemap viewer for python
As part of my current obsession with visualising test coverage for my huge app at work (I have a sneaky suspicion that other coders are not testing their code) I have been playing around with tree visualisation. My first port of call, graphviz, works ok for a small app but cant handle the huge app I’m interested in. eog was using all 1gig of my memory to try and render the svg file, which got quite boring. Then I remembered treemaps. They’re a great way of viewing trees where the nodes are considered to have a size.
I couldn’t find a decent viewer in python, so I thought I’d knock one up. It seems quick enough and does the job. I even used pylab to allow the use to zoom in on particular nodes to see whats going on in a busy part.

You can’t see the node labels, but they are displayed in the interactive map. I couldn’t think of a decent way of getting them into a node that could be really small.
It also became a nice guinea pig for testing the setuptools automate cheeseshop /pypi upload. Its really good, and worked without a hitch. You should now be able to do easy_install treemap!
I couldn’t find a decent viewer in python, so I thought I’d knock one up. It seems quick enough and does the job. I even used pylab to allow the use to zoom in on particular nodes to see whats going on in a busy part.

You can’t see the node labels, but they are displayed in the interactive map. I couldn’t think of a decent way of getting them into a node that could be really small.
It also became a nice guinea pig for testing the setuptools automate cheeseshop /pypi upload. Its really good, and worked without a hitch. You should now be able to do easy_install treemap!
August 26th, 2006 at 3:17 pm First thanks for creating this python implementation of treemaps!
I couldn’t get the egg file to work - it worked just running __init__.py. I don’t know much about creating eggs, but think it should have code in a file named treemap or Treemap.
I ended up renaming __init__.py to testtreemap.py in another directtory, then running easy_setup -f #egg=testreemap-1.0 testtreemap. The resulting egg file let me run the demo code from a separate file with the addition of “from testtreemap import Treemap”
cheers