From: Stephen R. <snr...@ya...> - 2004-06-22 12:34:57
|
I'm using matplotlib 0.54.2 (failed in 0.53.1 also) on Mac OS X with Python 2.3 and wxPython 2.5.1.5, and get the following traceback from this code. Looking at the backend_wx.py, I can find no other mention of "FigureBase" anywhere else. What should this line actually be? (I tried a few thoughts, but none worked) I'm basically trying to create a class that encapsulates a multi-value temperature bar graph, using the Observer pattern, and have inherited from the FigureCanvasWx class. If this is incorrect, I'm all ears to alternative suggestions. TIA Code: class ociTemperatureGraph(FigureCanvasWx, Observer): def __init__(self, parent): wxPanel.__init__(self, parent, -1) self.fig = Figure((3,3), 75) self.subplot = Subplot(self.fig, 111) <snip> self.add_axis(self.subplot) <<-- blows up here Traceback (most recent call last): File "./ociTemperatureGraph.py", line 86, in ? main() File "./ociTemperatureGraph.py", line 74, in main frame = PlotFigure() File "./ociTemperatureGraph.py", line 60, in __init__ self.fig = ociTemperatureGraph(self) File "./ociTemperatureGraph.py", line 42, in __init__ self.add_axis(self.subplot) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/matplotlib/backends/backend_wx.py", line 888, in add_axis FigureBase.add_axis(self, a) NameError: global name 'FigureBase' is not defined |