Bala subramanian, on 2011-01-17 16:42, wrote:
I have created a figure (with two rows and two columns) and i drew four
contourf plots (A,B,C,D etc). All the four contourf has the same coloring
and bounds. I do not want to draw a colorbar() for each of the plots
separately but only one colorbar at the bottom of the four plots.Something
like the following scheme.
Here's one way of getting the type of plot you want.
I just incremented NROW by one, and for the colorbar axes
creation, changed it to be:
which is a quick way to get the last row to span both columns.
(I had to comment some things out to get the plot to run without
needing the data).
I tried using mpl.colorbar.ColorbarBase as given in
http://matplotlib.sourceforge.net/examples/api/colorbar_only.html example to
draw the colorbar. However i find the colorbar that is created is
overlapping over the plots. Kindly let me know what is the correct way of
adjuting its location and size or any other way to create this colorbar.
There, the axes are created to not overlap by hand tuning the
rectangle parameters passed (left, bottom, width, top). You can
get the same using the trick I used above, or get more
sophisticated combinations using GridSpec , or if you want to
get even fancier, with the AxesGrid toolkit 
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7