On Tue, Jun 2, 2009 at 1:51 PM, Tom Vaughan <t...@software6.net> wrote:
> On Tue, Jun 2, 2009 at 07:33, John Hunter<jdh2...@gmail.com> wrote:
>> On Tue, Jun 2, 2009 at 9:03 AM, Tom Vaughan <t...@software6.net> wrote:
>>> Is it possible to add subplots to a figure if I don't know in advance
>>> how many subplots I need to add?
>>>
>>> What I do now is I call add_subplot like add_subplot(i, 1, i) where i
>>> is 1 initially, and just increases by 1 on each call. This almost
>>> works. Except the first plot takes up the whole figure, the second
>>> plot is placed on top of the bottom half of the first plot, etc. Is
>>> there a way to "resize" the plots when a subplot is added? Or how
>>> would I "re-plot" the previous subplots?
>>
>> See the Axes.change_geometry command
>>
>>  
>> http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.SubplotBase.change_geometry
>
> To follow-up on this a bit, the second, third, etc subplots all seem
> to get stuck with the first subplot's x-axis. Let's say the first plot
> is -60 to 60, and the second plot is 2 - 4. The data in the second
> plot is plotted on the correct scale (2 to 4), but I still see -60 to
> 60.
>
> Actually, this isn't entirely correct. When I add a third subplot, the
> second subplot becomes correct. So the -60 to 60 only sticks to the
> most recently added subplot.
>
> Any ideas?

post some code

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to