Re: [Matplotlib-users] manual placement of a colorbar

2010-04-01 Thread Jeff Whitaker
On 4/1/10 1:24 PM, Mathew Yeates wrote: Hi I have a Basemap and I want to manually add a colorbar to the side. As you can see in the attached image, the colorbar is not correctly positioned. Here is a snippet of code ax=fig.add_axes([0.1,0.1,0.8,.8]) m =

Re: [Matplotlib-users] manual placement of a colorbar

2010-04-01 Thread Mathew Yeates
This doesn't work for what I'm doing. Unless I call contour or something similar, this will fail. I am only using m.plot and this doesn't set things up properly to call colorbar. On Thu, Apr 1, 2010 at 12:40 PM, Jeff Whitaker jsw...@fastmail.fm wrote: On 4/1/10 1:24 PM, Mathew Yeates wrote:

Re: [Matplotlib-users] manual placement of a colorbar

2010-04-01 Thread Jae-Joon Lee
If you're not afraid of contaminating your code with axes_grid toolkit, instead cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar axes. try from mpl_toolkits.axes_grid import make_axes_locatable import matplotlib.axes as maxes divider = make_axes_locatable(ax) cax =

Re: [Matplotlib-users] manual placement of a colorbar

2010-04-01 Thread Mathew Yeates
Thanks a bunch JJ. I've been trying to figure that one out all day! Mathew On Thu, Apr 1, 2010 at 1:04 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote: If you're not afraid of contaminating your code with axes_grid toolkit, instead cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar