Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

IDLE python shell freezes after running show() of matplotlib

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


forrest.bao at gmail

Oct 24, 2009, 2:03 PM

Post #1 of 6 (857 views)
Permalink
IDLE python shell freezes after running show() of matplotlib

I am having a weird problem on IDLE. After I plot something using show
() of matplotlib, the python shell prompt in IDLE just freezes that I
cannot enter anything and there is no new ">>>" prompt show up. I
tried ctrl - C and it didn't work. I have to restart IDLE to use it
again.

My system is Ubuntu Linux 9.04. I used apt-get to install IDLE.
--
http://mail.python.org/mailman/listinfo/python-list


Scott.Daniels at Acm

Oct 24, 2009, 5:31 PM

Post #2 of 6 (819 views)
Permalink
Re: IDLE python shell freezes after running show() of matplotlib [In reply to]

Forrest Sheng Bao wrote:
> I am having a weird problem on IDLE. After I plot something using show
> () of matplotlib, the python shell prompt in IDLE just freezes that I
> cannot enter anything and there is no new ">>>" prompt show up. I
> tried ctrl - C and it didn't work. I have to restart IDLE to use it
> again.
>
> My system is Ubuntu Linux 9.04. I used apt-get to install IDLE.

You should really look at smart questions; I believe you have a problem,
and that you have yet to imagine how to give enough information for
someone else to help you.

http://www.catb.org/~esr/faqs/smart-questions.html

Hint: I don't know your CPU, python version, IDLE version, matplotlib
version, nor do you provide a small code example that allows me to
easily reproduce your problem (or not).

--Scott David Daniels
Scott.Daniels [at] Acm
--
http://mail.python.org/mailman/listinfo/python-list


dwinst at gmail

Oct 27, 2009, 11:26 AM

Post #3 of 6 (812 views)
Permalink
Re: IDLE python shell freezes after running show() of matplotlib [In reply to]

I have this problem as well. I'm on Windows XP (32-bit x86 processor)
using Python 2.6.4 and matplotlib 0.99.1 (installed with
matplotlib-0.99.1.win32-py2.6.exe). The IDLE version is 2.6.4. The
difficulty occurs for me during the first example of the (official?)
Pyplot tutorial at <http://matplotlib.sourceforge.net/users/
pyplot_tutorial.html>, so it is possible that many new users of pyplot
experience this same difficulty:

import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.ylabel('some numbers')
plt.show()

I see the plot, and I can close the plot window by clicking on the X
at the upper-right corner of the plot window. However, as Forrest
mentioned, IDLE does not then spit out the next command prompt, nor
does IDLE respond to a Ctrl-C.

I have found that by turning on pyplot's 'interactive mode', the above
problem does not occur:

import matplotlib.pyplot as plt
plt.ion()
plt.plot([1,2,3]) # plot opens after this command is issued, and new
command prompt appears
plt.ylabel('some numbers') # if plot is not closed before issuing this
command, then the open plot window is updated
plt.close() # same effect as manually click-closing the plot window

On Oct 24, 5:03 pm, Forrest Sheng Bao <forrest....@gmail.com> wrote:
> I am having a weird problem on IDLE. After I plot something using show
> () of matplotlib, the python shell prompt in IDLE just freezes that I
> cannot enter anything and there is no new ">>>" prompt show up. I
> tried ctrl - C and it didn't work. I have to restart IDLE to use it
> again.
>
> My system is Ubuntu Linux 9.04. I used apt-get to install IDLE.

--
http://mail.python.org/mailman/listinfo/python-list


brenNOSPAMbarn at NObrenSPAMbarn

Oct 28, 2009, 11:41 AM

Post #4 of 6 (788 views)
Permalink
Re: IDLE python shell freezes after running show() of matplotlib [In reply to]

Forrest Sheng Bao wrote:

> I am having a weird problem on IDLE. After I plot something using show
> () of matplotlib, the python shell prompt in IDLE just freezes that I
> cannot enter anything and there is no new ">>>" prompt show up. I
> tried ctrl - C and it didn't work. I have to restart IDLE to use it
> again.
>
> My system is Ubuntu Linux 9.04. I used apt-get to install IDLE.

I believe this is the intended behavior. Look in matplotlib
documentation on the difference between interactive and non-interactive
modes.

--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
--author unknown
--
http://mail.python.org/mailman/listinfo/python-list


sccolbert at gmail

Oct 28, 2009, 3:09 PM

Post #5 of 6 (790 views)
Permalink
Re: IDLE python shell freezes after running show() of matplotlib [In reply to]

This is a threading issue that is very common when using gui toolkits
with the interactive interpreter.

You're better off just using ipython, which already has builtin
support for matplotlib when you start it via "ipython -pylab"



On Wed, Oct 28, 2009 at 7:41 PM, OKB (not okblacke)
<brenNOSPAMbarn [at] nobrenspambarn> wrote:
> Forrest Sheng Bao wrote:
>
>> I am having a weird problem on IDLE. After I plot something using show
>> () of matplotlib, the python shell prompt in IDLE just freezes that I
>> cannot enter anything and there is no new ">>>" prompt show up. I
>> tried ctrl - C and it didn't work. I have to restart IDLE to use it
>> again.
>>
>> My system is Ubuntu Linux 9.04. I used apt-get to install IDLE.
>
>        I believe this is the intended behavior.  Look in matplotlib
> documentation on the difference between interactive and non-interactive
> modes.
>
> --
> --OKB (not okblacke)
> Brendan Barnwell
> "Do not follow where the path may lead.  Go, instead, where there is
> no path, and leave a trail."
>        --author unknown
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list


mchl.dodd at gmail

Nov 9, 2009, 2:08 PM

Post #6 of 6 (732 views)
Permalink
Re: IDLE python shell freezes after running show() of matplotlib [In reply to]

On Oct 28, 11:09 pm, Chris Colbert <sccolb...@gmail.com> wrote:
> This is a threading issue that is very common when using gui toolkits
> with the interactive interpreter.
>
> You're better off just using ipython, which already has builtin
> support for matplotlib when you start it via "ipython -pylab"
>
> On Wed, Oct 28, 2009 at 7:41 PM, OKB (not okblacke)
>
>
>
> <brenNOSPAMb...@nobrenspambarn.net> wrote:
> > Forrest Sheng Bao wrote:
>
> >> I am having a weird problem on IDLE. After I plot something using show
> >> () of matplotlib, the python shell prompt in IDLE just freezes that I
> >> cannot enter anything and there is no new ">>>" prompt show up. I
> >> tried ctrl - C and it didn't work. I have to restart IDLE to use it
> >> again.
>
> >> My system is Ubuntu Linux 9.04. I used apt-get to install IDLE.
>
> >        I believe this is the intended behavior.  Look in matplotlib
> > documentation on the difference between interactive and non-interactive
> > modes.
>
> > --
> > --OKB (not okblacke)
> > Brendan Barnwell
> > "Do not follow where the path may lead.  Go, instead, where there is
> > no path, and leave a trail."
> >        --author unknown
> > --
> >http://mail.python.org/mailman/listinfo/python-list

Same problem for me using IDLE 1.2.4, python 2.5.4, and matplotlib
0.99.1.1. Windows XP 32bit.

Turning on interactive mode solved the problem with IDLE freezing,
however the plot window still comes up empty and frozen.

Using iPython now with no problems so far. Hopefully the problem with
IDLE gets fixed.
--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.