2012-12-11 33 views
1

我用py2.7环保署for Windows的免费版本,我有一个使用NetCDF4读取数据的过程我用底图1.0.5从
http://sourceforge.net/projects/matplotlib/files/matplotlib-toolkits/Python的matplotlib /底图错误信息

当我绘制我的数字它的效果好几次,然后我得到以下错误信息,当我重新启动(关闭并再次打开)EPD,直到它再次出现时,问题得到解决。它可能是matplotlib中的错误吗?以及如何解决问题? 谢谢

*In [9]: Traceback (most recent call last): 
    File "C:\Python27\EPD\lib\site-packages\wx\_misc.py", line 1342, in Notify 
    self.notify() 
    File "C:\Python27\EPD\lib\site-packages\wx\_core.py", line 14720, in Notify 
    self.result = self.callable(*self.args, **self.kwargs) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\backends\backend_wx.py", li 
ne 990, in _onDrawIdle 
    self.draw(*args, **kwargs) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\backends\backend_wxagg.py", 
line 59, in draw 
    FigureCanvasAgg.draw(self) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\backends\backend_agg.py", l 
ine 401, in draw 
    self.figure.draw(self.renderer) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\artist.py", line 55, in dra 
w_wrapper 
    draw(artist, renderer, *args, **kwargs) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\figure.py", line 884, in dr 
aw 
    func(*args) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\artist.py", line 55, in dra 
w_wrapper 
    draw(artist, renderer, *args, **kwargs) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\axes.py", line 1983, in dra 
w 
    a.draw(renderer) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\artist.py", line 55, in dra 
w_wrapper 
    draw(artist, renderer, *args, **kwargs) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\image.py", line 355, in dra 
w 
    im = self.make_image(renderer.get_image_magnification()) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\image.py", line 575, in mak 
e_image 
    transformed_viewLim) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\image.py", line 202, in _ge 
t_unsampled_image 
    x = self.to_rgba(self._A, self._alpha, bytes=True) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\cm.py", line 213, in to_rgb 
a 
    x = self.norm(x) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\colors.py", line 845, in __ 
call__ 
    result, is_scalar = self.process_value(value) 
    File "C:\Python27\EPD\lib\site-packages\matplotlib\colors.py", line 835, in pr 
ocess_value 
    result = result.astype(np.float32) 
    File "C:\Python27\EPD\lib\site-packages\numpy\ma\core.py", line 2908, in astyp 
e 
    output = self._data.astype(newtype).view(type(self)) 
MemoryError 
If you suspect this is an IPython bug, please report it at: 
    https://github.com/ipython/ipython/issues 
or send an email to the mailing list at [email protected] 
You can print a more detailed traceback right now with "%tb", or use "%debug" 
to interactively debug it. 
Extra-detailed tracebacks for bug-reporting purposes can be enabled via: 
    %config Application.verbose_crash=True* 
+0

它说,它是一个内存错误(即,在内存运行空间),这也解释了为什么会发生不一致,可以通过重新启动IDLE固定。您绘制的数据有多大? –

+0

它是一个非常大的文件,以1km分辨率覆盖整个大陆的雷达地图。如何在每个情节之后释放记忆? –

+0

我以为plt.clf()会清除内存并解决问题,但它没有 –

回答