added new methods to the MPLWidget class to control the axes labels

This commit is contained in:
Sebastian Wehling-Benatelli 2015-02-04 14:49:49 +01:00
parent 36675d4a92
commit 401c09d0b4

View File

@ -53,10 +53,21 @@ class MPLWidget(FigureCanvas):
self.canvas = FigureCanvas(self.figure)
self.axes = self.figure.add_subplot(111)
self.axes.set_xlabel(xlabel)
self.axes.set_ylabel(ylabel)
self.axes.set_title(title)
self.updateWidget(xlabel, ylabel, title)
def updateXLabel(self, text):
self.axes.set_xlabel(text)
def updateYLabel(self, text):
self.axes.set_ylabel(text)
def updateTitle(self, text):
self.axes.set_title(text)
def updateWidget(self, xlabel, ylabel, title):
self.updateXLabel(xlabel)
self.updateYLabel(ylabel)
self.updateTitle(title)
class PickDlg(QDialog):