Sebastian Berg, on 2011-07-11 18:16,  wrote:
> On Mon, 2011-07-11 at 07:13 -0700, SiggiN wrote:
> > is ther a way to not let the colorbar cut space from the 2nd subplot. I
> > would like to have them both the same size.

yes, you can pass the  cax parameter to colorbar which will put
it inside that axis.

replace your code from line 'plt.figure()' with this:

  f,(ax,ax2,ax3) = plt.subplots(3,1) 
  CS = ax.contourf(X, Y, Z)
  CS = ax2.contourf(X, Y, Z)
  plt.colorbar(CS,cax=ax3,orientation='horizontal')

> What you need to do (I think and I always do it like this)
> Define 3 sets of axes by hand instead of subplot(211) you use
> plt.axes(...) to create them (I guess there may be a nicer
> method, not sure). 

I belive the plt.subplots() command is what Sebastian was
referring to.

best,
-- 
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to