Figure size and colorbars

Hi,

I’ve got two questions involving matplotlib :

  1. Is there a way to ask matplotlib to automatically adjust the size of its figures to fit the size of their content ?
    I’m using axis(‘equal’). Therefore I often have figures with lot of blank, like the figure d0.jpg attached, and I would rather have something like d1.jpg.

  2. Is this possible to have an horizontal colorbar ?

Thanks

d0.jpg

d1.jpg

···


LB

LB wrote:

     Hi,

I've got two questions involving matplotlib :

1) Is there a way to ask matplotlib to automatically adjust the size of its figures to fit the size of their content ?
I'm using axis('equal'). Therefore I often have figures with lot of blank, like the figure d0.jpg attached, and I would rather have something like d1.jpg.

Try

axis('scaled')

or

axis('image')

2) Is this possible to have an horizontal colorbar ?

Yes:

colorbar(orientation='horizontal')

This kwarg seems to be missing from the docstring; I will fix that.

Eric

···

Thanks

--
LB

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/

------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options