Re: [Matplotlib-users] add_axes

2011-08-12 Thread Christopher Brown
Hi Ben, Eric and Paul, Paul's partial solution is actually exactly what I need. Thanks! -Chris On Friday, August 12, 2011 07:26:22 PM Benjamin Root wrote: > On Friday, August 12, 2011, Christopher Brown wrote: > > Thanks Ben, > > > > I should have been more clear. In fact I do want to create a

Re: [Matplotlib-users] add_axes

2011-08-12 Thread Eric Firing
On 08/12/2011 03:58 PM, Christopher Brown wrote: > Thanks Ben, > > I should have been more clear. In fact I do want to create an entirely new > figure containing the already created axes. This might not be the best way to > do what I want to do, but the docs for add_axes states that passing an axes

Re: [Matplotlib-users] add_axes

2011-08-12 Thread Eric Firing
On 08/12/2011 03:00 PM, Paul Ivanov wrote: > Christopher Brown, on 2011-08-12 16:56, wrote: >> I feel like I'm doing this right, but it doesn't work. Any clues? >> >> from matplotlib import pyplot as pp >> >> pp.plot((1,2,3)) >> ax = pp.gca() >> f = pp.figure(num=2) >> print 'first: %i' % ax.figur

Re: [Matplotlib-users] add_axes

2011-08-12 Thread Benjamin Root
On Friday, August 12, 2011, Christopher Brown wrote: > Thanks Ben, > > I should have been more clear. In fact I do want to create an entirely new > figure containing the already created axes. This might not be the best way to > do what I want to do, but the docs for add_axes states that passing an

Re: [Matplotlib-users] add_axes

2011-08-12 Thread Christopher Brown
Thanks Ben, I should have been more clear. In fact I do want to create an entirely new figure containing the already created axes. This might not be the best way to do what I want to do, but the docs for add_axes states that passing an axes instance will add that instance to the figure. I must

Re: [Matplotlib-users] add_axes

2011-08-12 Thread Eric Firing
On 08/12/2011 01:56 PM, Christopher Brown wrote: > I feel like I'm doing this right, but it doesn't work. Any clues? > > from matplotlib import pyplot as pp > > pp.plot((1,2,3)) > ax = pp.gca() > f = pp.figure(num=2) > print 'first: %i' % ax.figure.number > print 'second: %i' % f.number > f.add_axe

Re: [Matplotlib-users] add_axes

2011-08-12 Thread Paul Ivanov
Christopher Brown, on 2011-08-12 16:56, wrote: > I feel like I'm doing this right, but it doesn't work. Any clues? > > from matplotlib import pyplot as pp > > pp.plot((1,2,3)) > ax = pp.gca() > f = pp.figure(num=2) > print 'first: %i' % ax.figure.number > print 'second: %i' % f.number > f.add_ax

Re: [Matplotlib-users] add_axes

2011-08-12 Thread Benjamin Root
Yes, you are making it harder on yourself... On Friday, August 12, 2011, Christopher Brown wrote: > I feel like I'm doing this right, but it doesn't work. Any clues? > > from matplotlib import pyplot as pp > > pp.plot((1,2,3)) > ax = pp.gca() At this point, a figure is implicitly created because

[Matplotlib-users] add_axes

2011-08-12 Thread Christopher Brown
I feel like I'm doing this right, but it doesn't work. Any clues? from matplotlib import pyplot as pp pp.plot((1,2,3)) ax = pp.gca() f = pp.figure(num=2) print 'first: %i' % ax.figure.number print 'second: %i' % f.number f.add_axes(ax) yields: Traceback (most recent call last): File "", line

Re: [Matplotlib-users] add_axes in inches

2009-11-09 Thread Jae-Joon Lee
On Thu, Nov 5, 2009 at 2:31 PM, Thomas Robitaille wrote: > Is there an easy way to add axes to a figure, but specify the 'rect' > in real rather than relative units? For example, something like: > unfortunately no. And I'm not sure if matplotlib will ever going to support it internally. However,

[Matplotlib-users] add_axes in inches

2009-11-05 Thread Thomas Robitaille
Hi, Is there an easy way to add axes to a figure, but specify the 'rect' in real rather than relative units? For example, something like: fig.add_axes([0.5,0.5,3.,3.], inches=True) This would guarantee that for example if I want to increase the canvas size to add more subplots, I don't have