Matplotlib plot freezes in pyscripter

296 views
Skip to first unread message

Clark Kogan

unread,
May 14, 2010, 3:47:33 PM5/14/10
to PyScripter
I am using the built in interpreter in pyscripter, and am trying to
create a simple plot. I use the following code:

import numpy as np
import matplotlib.pyplot as plt

x = np.array([1,2,3])
y = np.array([2.3,5,6])
plt.plot(x,y)
plt.show()

The first time that I run it (after opening pyscripter) everything
works fine. I get the plot and I can move it around and close it with
a mouse click.

The second time that I run it, the figure comes up, but the plot does
not appear. Instead, the figure stays gray. I try to close the figure
by pressing the x in the upper right corner, and it does nothing. Then
I try to move the plot, and I get the popup error:

Microsoft Visual C++ Runtime Library
Program: C:\Program Files\PyScripter\PyScripter.exe
This application has requested the Runtime to terminate it in an
unusual way.

If instead of trying to move the figure around, I type:
close()

then the figure will close.

I am running windows vista 32 bit, and am using python 2.6.
Thanks for your help!

- Clark

--
You received this message because you are subscribed to the Google Groups "PyScripter" group.
To post to this group, send email to pyscr...@googlegroups.com.
To unsubscribe from this group, send email to pyscripter+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyscripter?hl=en.

Colin J. Williams

unread,
May 14, 2010, 7:54:53 PM5/14/10
to pyscr...@googlegroups.com, Clark Kogan
Clark,

Using your code, I get a similar result.  Except the figure fails to show for the second try.


Colin W.
Reply all
Reply to author
Forward
0 new messages