From: Eric F. <ef...@ha...> - 2007-11-27 18:06:08
|
Michael Droettboom wrote: > > You can get the axes through the Figure instance. (I don't know how you > have your embedding set up, but if it's something like > embedding_in_wx.py, there's the line "self.fig = Figure((9, 8), 75)", so > self.fig is a Figure instance). > > self.fig.gca() # gets the current axes > self.fig.axes # is a Python list of axes -- useful if you have more > than one and you need to access a particular one of them Or just keep track of the axes object when it is created. In embedding_in_wx.py: def plot_data(self): # Use ths line if using a toolbar a = self.fig.add_subplot(111) .... "a" is the axes instance. Eric |