From b23c9d1104fa1944c2060d02358b62867d22c80c Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Sun, 1 Mar 2015 10:33:13 +0100 Subject: [PATCH] initialized new widget and window for picking (work in progress) --- pylot/core/util/widgets.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 0d0d158e..6b0058be 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -70,6 +70,26 @@ class MPLWidget(FigureCanvas): self.updateYLabel(ylabel) self.updateTitle(title) + +class multiComponentPlot(FigureCanvas): + + def __init__(self, parent=None, noc=3, xlabel='x', ylabel='y', title='Title'): + super(multiComponentPlot, self).__init__(Figure()) + + self.setParent(parent) + self.figure = Figure() + self.canvas = FigureCanvas(self.figure) + + self.axeslist = [] + + for n in range(noc): + nsub = '{0}1{1}'.format(noc, n) + if n >= 1: + self.axeslist.insert(n, self.figure.add_subplot(nsub, sharex=self.axeslist[0], sharey=self.axeslist[0])) + else: + self.axeslist.insert(n, self.figure.add_subplot(nsub)) + + class PickDlg(QDialog): def __init__(self, station=None, parent=None):