Question

Using matplotlib/pylab....

How do I plot 5 heatmaps as subplots which have the same number of columns but different row counts? In other words, I need each subplot's height to be scaled differently.

Perhaps an image better illustrates the problem...

alt text http://img98.imageshack.us/img98/5853/heatmap.png

I need the data points to all be square, AND the columns to be lined up, so the heights have to change according to how many rows each subplot has.

I've tried:

  1. The scaling options mentioned here. The above plot is with axis('tight').
  2. The y-axis scaling solutions mentioned here.

... but no luck so far.

Was it helpful?

Solution

I haven't tried this for any of my own work, but perhaps the matplotlib AxesGrid toolkit might be what you are looking for.

OTHER TIPS

Don't use subplot but axes to create your subplots - the latter allows arbitrary positioning of the subplot.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top