Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## RE: [Boa Constr] converting the matplotlib example so that it can be read Boa

 RE: [Boa Constr] converting the matplotlib example so that it can be read Boa From: POYEN OP Olivier (DCL) - 2005-03-31 15:02:26 ```> also when i enable this part(sort of renamed it): > =20 > self.frame =3D PlotFigure() > self.frame.plot_data() > self.frame.Show() > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > the error i get is when i try to run the main frame and click the > button to call this frame: >=20 > wxFrame2.create(self).Show(true) > File "E:\final docu\shorterFolder4.2pssl2\wxFrame2.py",=20 > line 14, in create > return wxFrame2(parent) > File "E:\final docu\shorterFolder4.2pssl2\wxFrame2.py",=20 > line 47, in __init__ > self.frame =3D PlotFigure() > NameError: global name 'PlotFigure' is not defined >=20 >=20 Same error as I mentioned you yesterday.=20 You need to import the object you're using, be it matplotlib or = wxplotlib. Yesterday, a "from wx.pyploylib import *" should have fix it.=20 Certainly PlotFigure comes from the matplotlib module.=20 You should import it first. Try not to "copy paste" those import lines directly.=20 Try to understand the error message first . Here, the error ("NameError : PlotFigure" ), clearly tells you the = interpreter needs PlottFigure before processing.=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > and when i try to go to the designer i get this error: > >=20 [Boa error snipped] > any help will be greatly appreciated... >=20 As Riaan said, you should not mix your code and Boa code. Otherwise you = get such results.=20 Try removing all your code from the "don't edit" method generated by Boa = ```

### Thread view

 RE: [Boa Constr] converting the matplotlib example so that it can be read Boa From: POYEN OP Olivier (DCL) - 2005-03-31 15:02:26 ```> also when i enable this part(sort of renamed it): > =20 > self.frame =3D PlotFigure() > self.frame.plot_data() > self.frame.Show() > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > the error i get is when i try to run the main frame and click the > button to call this frame: >=20 > wxFrame2.create(self).Show(true) > File "E:\final docu\shorterFolder4.2pssl2\wxFrame2.py",=20 > line 14, in create > return wxFrame2(parent) > File "E:\final docu\shorterFolder4.2pssl2\wxFrame2.py",=20 > line 47, in __init__ > self.frame =3D PlotFigure() > NameError: global name 'PlotFigure' is not defined >=20 >=20 Same error as I mentioned you yesterday.=20 You need to import the object you're using, be it matplotlib or = wxplotlib. Yesterday, a "from wx.pyploylib import *" should have fix it.=20 Certainly PlotFigure comes from the matplotlib module.=20 You should import it first. Try not to "copy paste" those import lines directly.=20 Try to understand the error message first . Here, the error ("NameError : PlotFigure" ), clearly tells you the = interpreter needs PlottFigure before processing.=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > and when i try to go to the designer i get this error: > >=20 [Boa error snipped] > any help will be greatly appreciated... >=20 As Riaan said, you should not mix your code and Boa code. Otherwise you = get such results.=20 Try removing all your code from the "don't edit" method generated by Boa = ```