Lee Boger wrote:
Thanks for the quick feedback. I changed the last line from figure.figure.show() to pyplot.show() and it worked without crashing the interpreter. However, if I close the figure then re-run the script, a new figure pops up but it doesn't have any data plotted. Interpreter is now locked up, the run-time error occurred and no figure stored as a file log_plot. I un-installed numpy-1.4.0 and installed numpy-1.3.0, but the results were as I just described.
At this point a Windows user may need to step in. I know nothing about PythonWin. My suspicion is that this is a problem of dueling event loops, and one solution would be to use ipython instead of pythonwin.
(Note that you typically need to use "reply to all" on this list, otherwise the reply does not get copied to the list.)
*Eric Firing <efiring@...202...>*
02/09/2010 01:35 PM
Lee Boger <Boger_Lee@...2968...>
Re: [Matplotlib-users] Runtime Error - Need Advice
Caterpillar: Confidential Green Retain Until: 03/11/2010
Lee Boger wrote:
> Windows XP Professional with Python 2.5 installed (pywin32 build 210) -
> came with dSPACE software package
> Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from
> Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from
I suspect this is the problem: numpy-1.4.0 is considered broken and has
been withdrawn. Specifically, it introduces binary incompatibility with
programs compiled against prior versions of numpy, including matplotlib.
If you go back to the numpy sourceforge site now, I think you will see
an earlier version that you can install in place of 1.4.0 (after
removing the latter).
> Executing the following simple "log plot" script within PythonWin:
> *from* matplotlib *import* pylab
> # Create some artificial data.
> test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
> 17, 18, 19, 20]
> test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5,
> -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25]
> spec_frequency = [6, 8]
> spec_results = [-3.0, -3.0]
> # Plot
> figure = pylab.subplot(111)
> figure.scatter(test_frequency, test_results, s=20, c='b', marker='s',
> figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s',
> figure.set_xlabel(r"Frequency (Hz)", fontsize = 12)
> figure.set_ylabel(r"Actuator Response (db)", fontsize = 12)
> Plots a figure on the screen that looks correct, then the following
> error (when I click OK, PythonWin closes)
> Any advice would be appreciated. Maybe it's an installation or setup
> issue, but I'm pretty knew to Python programming and don't know how to
> debug this.
> Lee Boger