|
From: K.-Michael A. <kmi...@gm...> - 2013-07-30 00:14:06
|
Hi! Is there a way to copy an axes object into different figures? The idea would be to first create a valuable plot, save it on its own into a file, and then add it to a subplots figure as part of an overview? I tried to play with this but can't make it to show up in an pylab session: plot(arange(10)) ax = gca() fig, axes = subplots(2,2) axes[0,0].set_axes(ax) If the above is correct, how can I make it show up now? fig.show() did not work and fig.draw() needs an artist and a renderer which I am unsure where to get them from? Any hints, or which docs to read as usual apprectiated! Michael |
|
From: Jeffrey S. <jef...@gm...> - 2013-07-31 16:52:08
|
You can try fig.canvas.draw() to draw but as I have never tried the above not sure whether it will work. Cheers On Tue, Jul 30, 2013 at 10:13 AM, K.-Michael Aye <kmi...@gm...>wrote: > Hi! > > Is there a way to copy an axes object into different figures? > The idea would be to first create a valuable plot, save it on its own > into a file, and then add it to a subplots figure as part of an > overview? > I tried to play with this but can't make it to show up in an pylab session: > > plot(arange(10)) > ax = gca() > > fig, axes = subplots(2,2) > > axes[0,0].set_axes(ax) > > If the above is correct, how can I make it show up now? fig.show() did > not work and fig.draw() needs an artist and a renderer which I am > unsure where to get them from? > > Any hints, or which docs to read as usual apprectiated! > Michael > > > > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Jeffrey S. <jef...@gm...> - 2013-07-31 17:02:36
|
Should have mentioned but the artist is like self in most classes so really just need to pass in the renderer. The renderer can be obtained from fig.canvas.get_renderer() so can pass this to fig.draw(fig.canvas.get_renderer()). I have never done it this way but should have the same results I am guessing as what I mentioned above. Cheers On Tue, Jul 30, 2013 at 10:13 AM, K.-Michael Aye <kmi...@gm...>wrote: > Hi! > > Is there a way to copy an axes object into different figures? > The idea would be to first create a valuable plot, save it on its own > into a file, and then add it to a subplots figure as part of an > overview? > I tried to play with this but can't make it to show up in an pylab session: > > plot(arange(10)) > ax = gca() > > fig, axes = subplots(2,2) > > axes[0,0].set_axes(ax) > > If the above is correct, how can I make it show up now? fig.show() did > not work and fig.draw() needs an artist and a renderer which I am > unsure where to get them from? > > Any hints, or which docs to read as usual apprectiated! > Michael > > > > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: K.-Michael A. <kmi...@gm...> - 2013-07-31 21:40:13
|
On 2013-07-31 17:02:12 +0000, Jeffrey Spencer said: > Should have mentioned but the artist is like self in most classes so > really just need to pass in the renderer. > > The renderer can be obtained from fig.canvas.get_renderer() so can pass > this to fig.draw(fig.canvas.get_renderer()). I have never done it this > way but should have the same results I am guessing as what I mentioned > above. There was no error message, but nothing showed up either. > > Cheers > > > On Tue, Jul 30, 2013 at 10:13 AM, K.-Michael Aye > <kmi...@gm...> wrote: > Hi! > > Is there a way to copy an axes object into different figures? > The idea would be to first create a valuable plot, save it on its own > into a file, and then add it to a subplots figure as part of an > overview? > I tried to play with this but can't make it to show up in an pylab session: > > plot(arange(10)) > ax = gca() > > fig, axes = subplots(2,2) > > axes[0,0].set_axes(ax) > > If the above is correct, how can I make it show up now? fig.show() did > not work and fig.draw() needs an artist and a renderer which I am > unsure where to get them from? > > Any hints, or which docs to read as usual apprectiated! > Michael > > > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: K.-Michael A. <kmi...@gm...> - 2013-07-31 21:45:14
|
On 2013-07-31 16:51:44 +0000, Jeffrey Spencer said: > You can try fig.canvas.draw() to draw but as I have never tried the > above not sure whether it will work. Also this one does not show anything, which makes me start to believe that the axes[0,0].set_axes(ax) could be the step that fails? > > Cheers > > > On Tue, Jul 30, 2013 at 10:13 AM, K.-Michael Aye > <kmi...@gm...> wrote: > Hi! > > Is there a way to copy an axes object into different figures? > The idea would be to first create a valuable plot, save it on its own > into a file, and then add it to a subplots figure as part of an > overview? > I tried to play with this but can't make it to show up in an pylab session: > > plot(arange(10)) > ax = gca() > > fig, axes = subplots(2,2) > > axes[0,0].set_axes(ax) > > If the above is correct, how can I make it show up now? fig.show() did > not work and fig.draw() needs an artist and a renderer which I am > unsure where to get them from? > > Any hints, or which docs to read as usual apprectiated! > Michael > > > > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: ChaoYue <cha...@gm...> - 2013-10-08 11:53:56
|
Hi Michael, so finally how it goes? I may use something similar, do you finally make it? cheers, Chao -- View this message in context: http://matplotlib.1069221.n5.nabble.com/way-to-copy-an-axes-object-into-different-figures-tp41623p42203.html Sent from the matplotlib - users mailing list archive at Nabble.com. |