From: Joshua K. <jjk...@gm...> - 2012-07-06 13:50:00
|
Hi all, I am currently trying to use matplotlib with wxPython and all is going well except for one annoying issue that I can't figure out. I initialize a wxcanvas object with a figure and then throughout the life of the program I want the canvas' figure to change and display the corresponding plot. I can get the change of figure, but when the program goes to plot, the figure isn't the right size. It changes to the right size only when I manually resize the figure (see attached images). Is there some command that I am missing? This is the update sequence I am using: self.figure = figure self.canvas.figure.clear() self.canvas.figure = self.figure self.canvas.draw() self.color_background() #self.GetParent().Layout() #self.SetSizer(self.main_sizer) #self.Fit() self.SendSizeEvent() As you can tell from the comments (there are more in my code), I have tried a variety of ways to update the figure off the bat. Thanks! Josh |