SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] [IPython-dev] Testing matplotlib on IPython trunk

From: Gökhan S. <gok...@gm...> - 2009年09月22日 04:17:05
On Tue, Sep 8, 2009 at 3:45 PM, Fernando Perez <fpe...@gm...> wrote:
> Hey Gokhan,
>
> thanks for the summary.
>
> On Tue, Sep 8, 2009 at 12:45 PM, Gökhan Sever <gok...@gm...>
> wrote:
> > ### In a new IPython, these lines work --no locking after plt.show() "-a"
> > makes the difference.
> >
> > I[1]: import matplotlib.pyplot as plt
> >
> > I[2]: %gui -a qt
> > O[2]: <PyQt4.QtGui.QApplication object at 0x8fdceac>
> >
> > I[3]: plt.plot(range(10))
> > O[3]: [<matplotlib.lines.Line2D object at 0x9a2c84c>]
> >
> > I[4]: plt.show()
>
> If you do
>
> plt.ion()
>
> right after you import it, then you don't need to do 'show'
> explicitely anymore. Basically what today's '-pylab' does is:
>
> - a bunch of imports
> - the equivalent of %gui, but uglier and at startup
> - do plt.ion() for you
> - patch %run a little so it does ioff() before starting up and ion() at the
> end.
>
> As you can see, even now with trunk in the state of upheaval it is,
> you can get almost all of this back with this snippet. This is pretty
> much what we'll make available built-in when the dust settles (with
> the 'import *' being optional, as they are today):
>
>
It's a very late reply but I am wondering how to make these appear in the
Ipy dev loaded into the session but not visible to a whos listing?
Thanks.
> %gui -a qt
>
> import numpy as np
> import matplotlib.pyplot as plt
> import matplotlib.pylab as pylab
> import matplotlib.mlab as mlab
>
> from numpy import *
> from matplotlib.pyplot import *
>
> plt.ion()
>
>
> ### END CODE
>
> Cheers,
>
> f
>
-- 
Gökhan

View entire thread

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 によって変換されたページ (->オリジナル) /