Possible fix for 2.6 versions of Matplotlib
Long standing issue with multiple plots being added to a single canvas. Calling canvas.draw() appears to be the "correct" way to do this in pythin 2.6 Need someone to test if this still works in python 2.5
This commit is contained in:
parent
b92feee021
commit
d8df3ea11a
|
@ -126,10 +126,11 @@ class GuiGraphViewer (threading.Thread):
|
||||||
#end def get_vbox
|
#end def get_vbox
|
||||||
|
|
||||||
def clearGraphData(self):
|
def clearGraphData(self):
|
||||||
self.fig.clf()
|
self.fig.clear()
|
||||||
if self.canvas is not None:
|
if self.canvas is not None:
|
||||||
self.canvas.destroy()
|
self.canvas.destroy()
|
||||||
|
|
||||||
|
if self.canvas == None:
|
||||||
self.canvas = FigureCanvas(self.fig) # a gtk.DrawingArea
|
self.canvas = FigureCanvas(self.fig) # a gtk.DrawingArea
|
||||||
|
|
||||||
def generateGraph(self, widget, data):
|
def generateGraph(self, widget, data):
|
||||||
|
@ -197,6 +198,7 @@ class GuiGraphViewer (threading.Thread):
|
||||||
|
|
||||||
self.graphBox.add(self.canvas)
|
self.graphBox.add(self.canvas)
|
||||||
self.canvas.show()
|
self.canvas.show()
|
||||||
|
self.canvas.draw()
|
||||||
#self.exportButton.set_sensitive(True)
|
#self.exportButton.set_sensitive(True)
|
||||||
#end of def showClicked
|
#end of def showClicked
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user