class ThermoWidget(pg.GraphicsLayoutWidget):
def __init__(self,*args, **kwargs):
super(ThermoWidget, self).__init__(*args, **kwargs)
self.p1 = self.addPlot(axisItems = {'bottom': CAxisTime(orientation='bottom')})
self.p2 = self.addPlot(axisItems = {'bottom': CAxisTime(orientation='bottom')})
self.curve1 = self.p1.plot()
self.curve2 = self.p2.plot()
self.nextRow()
self.p3 = self.addPlot(axisItems = {'bottom': CAxisTime(orientation='bottom')})
self.p4 = self.addPlot(axisItems = {'bottom': CAxisTime(orientation='bottom')})
self.curve3 = self.p3.plot()
self.curve4 = self.p4.plot()
self.nextRow()
self.p5 = self.addPlot(axisItems = {'bottom': CAxisTime(orientation='bottom')})
self.p6 = self.addPlot(axisItems = {'bottom': CAxisTime(orientation='bottom')})
self.curve5 = self.p5.plot()
self.curve6 = self.p6.plot()
self.p1.setXLink(self.p2)
self.p2.setXLink(self.p3)
self.p3.setXLink(self.p4)
self.p4.setXLink(self.p5)
self.p5.setXLink(self.p6)
def plot(self, data):
self.curve1.setData(data)
self.curve2.setData(data)
self.curve3.setData(data)
self.curve4.setData(data)
self.curve5.setData(data)
self.curve6.setData(data)
pg.QtGui.QApplication.processEvents()
class KinemWidget(pg.GraphicsLayoutWidget):
def __init__(self,*args, **kwargs):
super(KinemWidget, self).__init__(*args, **kwargs)
self.p1 = self.addPlot(axisItems = {'bottom': CAxisTime(orientation='bottom')})
self.p2 = self.addPlot(axisItems = {'bottom': CAxisTime(orientation='bottom')})
self.curve1 = self.p1.plot()
self.curve2 = self.p2.plot()
self.p1.setXLink(self.p2)
thermo=ThermoWidget()
self.p2.setXLink(thermo.p6)
def plot(self, data):
self.curve1.setData(data)
self.curve2.setData(data)
pg.QtGui.QApplication.processEvents()
self.p1.setXLink(self.p2)
thermo=ThermoWidget()
self.p2.setXLink(thermo.p6)