SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Andrew B. Y. <and...@sr...> - 2006年03月30日 21:38:57
Hello:
How does one go about controlling the size of a subplot?
I've got--
 figure = matplotlib.pylab.Figure()
 canvas = FigureCanvas( figure )
 axes_top = figure.add_subplot(211)
 axes_bottom = figure.add_subplot(212)
and I want the _top to occupy 4/5 of the png
and the _bottom to occupy the remaining 1/5.
Thanks!
Andrew
From: Malte M. <Mal...@cs...> - 2006年03月30日 23:47:51
oops shouldn't have gone to developers...
You are looking for
matplotlib.axes.Subplot.set_position
set_position(self, pos) method of matplotlib.axes.Subplot instance
 Set the axes position with pos = [left, bottom, width, height]
 in relative 0,1 coords
 ACCEPTS: len(4) sequence of floats
axes_top.set_position([left, bottom, width, height])
etc.
On Friday 31 March 2006 08:38, Andrew B. Young wrote:
> Hello:
>
> How does one go about controlling the size of a subplot?
> I've got--
>
> figure = matplotlib.pylab.Figure()
> canvas = FigureCanvas( figure )
> axes_top = figure.add_subplot(211)
> axes_bottom = figure.add_subplot(212)
>
> and I want the _top to occupy 4/5 of the png
> and the _bottom to occupy the remaining 1/5.
>
> Thanks!
> Andrew
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live
> webcast and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-- 
Malte Marquarding - Scientific Computing Group
Australia Telescope National Facility
Radiophysics Laboratory, PO Box 76, Epping, Australia, 1710
Phone: (+61) 2 9372 4485 (work) 
 (+61) 421 805 164 (mobile)
email: Mal...@cs...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /