[SciPy-user] wxWindow_GetClientSizeTuple problem using plt.plot
David Humphrey
dhumphrey at bellgeo.com
Wed Dec 18 19:04:49 EST 2002
Yesterday, I installed
SciPy-0.2.0_alpha_144.4350_src.tar.gz
wxPython 2.3.3.1 for Python 2.2
wxWindows 2.2.9
Numeric 22.0
I've had Python 2.2.1 from www.python.org installed for several weeks.
On a Windows NT 4.0 SP6a machine. I spent some time getting used to SciPy
as I have some prior experience with each of the other packages. At the
moment, I'm interested in plt.plot(). While I've been able to get a few
simple 2-D plots to work, I'm having a proble with the following code
residing in the file test2.py:
import gui_thread
from Numeric import *
from scipy import plt
from scipy import *
binz = array([-162., -126., -90., -54., -18., 18., 54., 90., 126.,
162.],Float)
countz = array([ 9006, 1621, 26248, 2912, 7096, 8537, 1533, 22517,
1224, 6563],Float)
plt.plot(binz,countz)
When I execute this script, I get the following results:
$ python test2.py
<wxPython imported>
>>>
Traceback (most recent call last):
File "D:\Utils\Python22\Lib\site-packages\scipy\plt\wxplt.py", line 143,
in on_paint
self.draw(wx.wxPaintDC(self))
File "D:\Utils\Python22\Lib\site-packages\scipy\plt\wxplt.py", line 411,
in draw
t1 = time.clock();self.reset_size(dc);t2 = time.clock()
File "D:\Utils\Python22\Lib\site-packages\scipy\plt\wxplt.py", line 357,
in reset_size
new_size = self.GetClientSizeTuple()
File "d:\Utils\Python22\lib\site-packages\wxPython\windows.py", line 194,
in GetClientSizeTuple
val = apply(windowsc.wxWindow_GetClientSizeTuple,(self,) + _args,
_kwargs)
AttributeError: 'NoneType' object has no attribute
'wxWindow_GetClientSizeTuple'
17:52:44: Debug: c:\projects\wx\src\msw\app.cpp(439):
'UnregisterClass(canvas)' failed with error 0x00000584 (class still has open
windows.).
Exception exceptions.TypeError: "'NoneType' object is not callable" in
<bound method wxPaintDC.__del__ of <C wxPaintDC instance at
_274db50_wxPaintDC_p>> ignored
Can anyone tell me what I'm doing wrong?
Regards,
David Humphrey
Director, Technical Services
Bell Geospace, Inc
More information about the SciPy-User
mailing list