From: Thomas H. <th...@gm...> - 2009-09-19 05:12:02
|
Hi all, I am a beginner with matplotlib and doing my first steps with python plotting. However, I learned that pyplot.show really forces the display of already existing plots. For instance, when I type In[2]: pyplot.plot([1,2,3]) Out[2]: [<matplotlib.lines.Line2D object at 0x2e33850>] nothing happens until I type In[3]: pyplot.show() After that, the interpreter halts until I close the new figure window. Only closing enables the interpreter to continue with my later input. Moreover, typing In[4]: pyplot.plot([1,2,3]) again would display the figure immediately. Seems the gtk engine or something else must be started up by pyplot.show once and, once running, it displays everything else after that instantly. How can I tweak pyplot in such way that it would display my figures on the very first pyplot.plot call without halting the input? Thank you in advance for your help, Thomas -- View this message in context: http://www.nabble.com/pyplot.show-tp25518658p25518658.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: sunqiang <sun...@gm...> - 2009-09-19 05:30:11
|
may be you can try pyplot.ion()? it turns interactive mode on. Hope this helps. On Sat, Sep 19, 2009 at 1:11 PM, Thomas Hrabe <th...@gm...> wrote: > > Hi all, > > I am a beginner with matplotlib and doing my first steps with python > plotting. > However, I learned that pyplot.show really forces the display of already > existing plots. > > For instance, when I type > In[2]: pyplot.plot([1,2,3]) > Out[2]: [<matplotlib.lines.Line2D object at 0x2e33850>] > > nothing happens until I type > > In[3]: pyplot.show() > > After that, the interpreter halts until I close the new figure window. Only > closing enables the interpreter to continue with my later input. Moreover, > typing > In[4]: pyplot.plot([1,2,3]) > > again would display the figure immediately. Seems the gtk engine or > something else must be started up by pyplot.show once and, once running, it > displays everything else after that instantly. > How can I tweak pyplot in such way that it would display my figures on the > very first pyplot.plot call without halting the input? > > Thank you in advance for your help, > Thomas > > -- > View this message in context: > http://www.nabble.com/pyplot.show-tp25518658p25518658.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Thomas H. <th...@go...> - 2009-09-19 05:38:06
|
Hi, thank you for the quick reply. Unfortunately, none of both works for me. values = [1,2,3]; pyplot.ioff(); #pyplot.ion(); print pyplot.isinteractive(); pyplot.plot(values); pyplot.show(); The value (True|False) of interactive mode does not make a difference to the plotting. Other suggestionst? Thanks so far! 2009/9/19 sunqiang <sun...@gm...> > may be you can try pyplot.ion()? it turns interactive mode on. > Hope this helps. > On Sat, Sep 19, 2009 at 1:11 PM, Thomas Hrabe <th...@gm...> wrote: > >> >> Hi all, >> >> I am a beginner with matplotlib and doing my first steps with python >> plotting. >> However, I learned that pyplot.show really forces the display of already >> existing plots. >> >> For instance, when I type >> In[2]: pyplot.plot([1,2,3]) >> Out[2]: [<matplotlib.lines.Line2D object at 0x2e33850>] >> >> nothing happens until I type >> >> In[3]: pyplot.show() >> >> After that, the interpreter halts until I close the new figure window. >> Only >> closing enables the interpreter to continue with my later input. Moreover, >> typing >> In[4]: pyplot.plot([1,2,3]) >> >> again would display the figure immediately. Seems the gtk engine or >> something else must be started up by pyplot.show once and, once running, >> it >> displays everything else after that instantly. >> How can I tweak pyplot in such way that it would display my figures on the >> very first pyplot.plot call without halting the input? >> >> Thank you in advance for your help, >> Thomas >> >> -- >> View this message in context: >> http://www.nabble.com/pyplot.show-tp25518658p25518658.html >> Sent from the matplotlib - users mailing list archive at Nabble.com. >> >> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register >> now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > |
From: sunqiang <sun...@gm...> - 2009-09-19 06:46:03
|
oops, maybe use pyplot.ion() not pyplot.ioff(). and pyplot.show() is not needed. just pyplot.plot(values) is enough to launch a new figure window and you can continue plot new lines or legend... interactively. I test it on my pc: Windows XP, Python 2.5.4, Matplotlib 0.99.0. On Sat, Sep 19, 2009 at 1:37 PM, Thomas Hrabe <th...@go...> wrote: > Hi, > > > thank you for the quick reply. Unfortunately, none of both works for me. > > > values = [1,2,3]; > > pyplot.ioff(); > > #pyplot.ion(); > > print pyplot.isinteractive(); > > pyplot.plot(values); > > pyplot.show(); > > The value (True|False) of interactive mode does not make a difference to > the plotting. > Other suggestionst? > > Thanks so far! > > 2009/9/19 sunqiang <sun...@gm...> > > may be you can try pyplot.ion()? it turns interactive mode on. >> Hope this helps. >> On Sat, Sep 19, 2009 at 1:11 PM, Thomas Hrabe <th...@gm...> wrote: >> >>> >>> Hi all, >>> >>> I am a beginner with matplotlib and doing my first steps with python >>> plotting. >>> However, I learned that pyplot.show really forces the display of already >>> existing plots. >>> >>> For instance, when I type >>> In[2]: pyplot.plot([1,2,3]) >>> Out[2]: [<matplotlib.lines.Line2D object at 0x2e33850>] >>> >>> nothing happens until I type >>> >>> In[3]: pyplot.show() >>> >>> After that, the interpreter halts until I close the new figure window. >>> Only >>> closing enables the interpreter to continue with my later input. >>> Moreover, >>> typing >>> In[4]: pyplot.plot([1,2,3]) >>> >>> again would display the figure immediately. Seems the gtk engine or >>> something else must be started up by pyplot.show once and, once running, >>> it >>> displays everything else after that instantly. >>> How can I tweak pyplot in such way that it would display my figures on >>> the >>> very first pyplot.plot call without halting the input? >>> >>> Thank you in advance for your help, >>> Thomas >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/pyplot.show-tp25518658p25518658.html >>> Sent from the matplotlib - users mailing list archive at Nabble.com. >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Come build with us! The BlackBerry® Developer Conference in SF, CA >>> is the only developer event you need to attend this year. Jumpstart your >>> developing skills, take BlackBerry mobile applications to market and stay >>> ahead of the curve. Join us from November 9-12, 2009. Register >>> now! >>> http://p.sf.net/sfu/devconf >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >> >> > |
From: Thomas H. <th...@gm...> - 2009-09-19 05:43:08
|
Hi, thank you for the quick reply. Unfortunately, none of both works for me. values = [1,2,3]; pyplot.ioff(); #pyplot.ion(); print pyplot.isinteractive(); pyplot.plot(values); pyplot.show(); The value (True|False) of interactive mode does not make a difference to the plotting. Other suggestionst? Thanks so far! >may be you can try pyplot.ion()? it turns interactive mode on. >Hope this helps. >On Sat, Sep 19, 2009 at 1:11 PM, Thomas Hrabe <th...@gm...> wrote: > > Hi all, > > I am a beginner with matplotlib and doing my first steps with python > plotting. > However, I learned that pyplot.show really forces the display of already > existing plots. > > For instance, when I type > In[2]: pyplot.plot([1,2,3]) > Out[2]: [<matplotlib.lines.Line2D object at 0x2e33850>] > > nothing happens until I type > > In[3]: pyplot.show() > > After that, the interpreter halts until I close the new figure window. > Only > closing enables the interpreter to continue with my later input. Moreover, > typing > In[4]: pyplot.plot([1,2,3]) > > again would display the figure immediately. Seems the gtk engine or > something else must be started up by pyplot.show once and, once running, > it > displays everything else after that instantly. > How can I tweak pyplot in such way that it would display my figures on the > very first pyplot.plot call without halting the input? > > Thank you in advance for your help, > Thomas > > -- > View this message in context: > http://www.nabble.com/pyplot.show-tp25518658p25518658.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register > now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- View this message in context: http://www.nabble.com/pyplot.show-tp25518658p25518780.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Gökhan S. <gok...@gm...> - 2009-09-19 05:51:26
|
Running IPython with -pylab or specifying the threading option? See more at http://ipython.scipy.org/doc/stable/html/interactive/reference.html?highlight=pylab On Sat, Sep 19, 2009 at 12:42 AM, Thomas Hrabe <th...@gm...> wrote: > > Hi, > > thank you for the quick reply. Unfortunately, none of both works for me. > > values = [1,2,3]; > pyplot.ioff(); > #pyplot.ion(); > print pyplot.isinteractive(); > pyplot.plot(values); > pyplot.show(); > > The value (True|False) of interactive mode does not make a difference to > the > plotting. > Other suggestionst? > > Thanks so far! > > > >may be you can try pyplot.ion()? it turns interactive mode on. > >Hope this helps. > >On Sat, Sep 19, 2009 at 1:11 PM, Thomas Hrabe <th...@gm...> wrote: > > > > > Hi all, > > > > I am a beginner with matplotlib and doing my first steps with python > > plotting. > > However, I learned that pyplot.show really forces the display of already > > existing plots. > > > > For instance, when I type > > In[2]: pyplot.plot([1,2,3]) > > Out[2]: [<matplotlib.lines.Line2D object at 0x2e33850>] > > > > nothing happens until I type > > > > In[3]: pyplot.show() > > > > After that, the interpreter halts until I close the new figure window. > > Only > > closing enables the interpreter to continue with my later input. > Moreover, > > typing > > In[4]: pyplot.plot([1,2,3]) > > > > again would display the figure immediately. Seems the gtk engine or > > something else must be started up by pyplot.show once and, once running, > > it > > displays everything else after that instantly. > > How can I tweak pyplot in such way that it would display my figures on > the > > very first pyplot.plot call without halting the input? > > > > Thank you in advance for your help, > > Thomas > > > > -- > > View this message in context: > > http://www.nabble.com/pyplot.show-tp25518658p25518658.html > > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > > > > > > > ------------------------------------------------------------------------------ > > Come build with us! The BlackBerry® Developer Conference in SF, CA > > is the only developer event you need to attend this year. Jumpstart your > > developing skills, take BlackBerry mobile applications to market and stay > > ahead of the curve. Join us from November 9-12, 2009. Register > > now! > > http://p.sf.net/sfu/devconf > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- > View this message in context: > http://www.nabble.com/pyplot.show-tp25518658p25518780.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Gökhan |
From: Thomas H. <th...@gm...> - 2009-09-19 06:55:51
|
starting with ipython -pylab solves it... thanks for the help! Thomas Hrabe wrote: > > Hi all, > > I am a beginner with matplotlib and doing my first steps with python > plotting. > However, I learned that pyplot.show really forces the display of already > existing plots. > > For instance, when I type > In[2]: pyplot.plot([1,2,3]) > Out[2]: [<matplotlib.lines.Line2D object at 0x2e33850>] > > nothing happens until I type > > In[3]: pyplot.show() > > After that, the interpreter halts until I close the new figure window. > Only closing enables the interpreter to continue with my later input. > Moreover, typing > In[4]: pyplot.plot([1,2,3]) > > again would display the figure immediately. Seems the gtk engine or > something else must be started up by pyplot.show once and, once running, > it displays everything else after that instantly. > How can I tweak pyplot in such way that it would display my figures on the > very first pyplot.plot call without halting the input? > > Thank you in advance for your help, > Thomas > > -- View this message in context: http://www.nabble.com/pyplot.show-tp25518658p25519154.html Sent from the matplotlib - users mailing list archive at Nabble.com. |