Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error, Using deprecated class PySimpleApp after removing EPD

I am using spyder on Mac OSX 10.8.2 and I had Enthought which I uninstalled. In my code I used pyplot from matplotlib. However I keep getting the following warning when I run the simple plot program.

 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_wx.py:1382: wxPyDeprecationWarning: Using deprecated class PySimpleApp. 
      wxapp = wx.PySimpleApp()

I tried pip, manual installing of matplotlib and non of them helped. What should I do about it? These are my code lines related to plotting:

markerSize=400;
fig = plt.gcf()
plt.scatter(X,Y,marker='+',s=markerSize)
circle=plt.Circle((X[i]+k*meshStep,Y[i]+j*meshStep),frequency/magnification,color='r');
fig.gca().add_artist(circle)
plt.xlim(min(X)-1,max(X)+1)
plt.ylim(min(Y)-1,max(Y)+1) 

Before uninstalling Enthought I didn't have this problem and my figure had zoom and move buttons but right now I only get the graph itself.

Thank you.

like image 426
Cupitor Avatar asked Dec 27 '22 08:12

Cupitor


1 Answers

You should use wx.App(False) instead of wx.PySimpleApp. PySimpleApp has been deprecated in wxPython 2.9. wx.App(False) does basically the same thing.

like image 101
Mike Driscoll Avatar answered Dec 28 '22 23:12

Mike Driscoll