Clean up old code and add docstrings.

This commit is contained in:
Tony S Yu
2012-07-21 17:08:19 -05:00
parent 47d5f028e5
commit fb3f201a2a
2 changed files with 40 additions and 22 deletions
+4 -3
View File
@@ -113,9 +113,6 @@ class Plugin(QtGui.QDialog):
self.row += 1
return name.replace(' ', '_'), slider
def redraw(self):
self.canvas.draw_idle()
def closeEvent(self, event):
"""Disconnect all artists and events from ImageViewer.
@@ -175,6 +172,10 @@ class PlotPlugin(Plugin):
# Add plot for displaying intensity profile.
self.add_plot()
def redraw(self):
"""Redraw plot."""
self.canvas.draw_idle()
def add_plot(self, height=4, width=4):
self.canvas = PlotCanvas(self, height, width)
self.fig = self.canvas.fig