How to scale matplotlib subplot heights individually
-
22-07-2019 - |
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:
- The scaling options mentioned here. The above plot is with
axis('tight')
. - The y-axis scaling solutions mentioned here.
... but no luck so far.
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow