I am using the DockArea() functionality in pyqtgraph to plot different 
graphs on different tabs. I am currently have all of the graphs on one dock 
xlinked, however I would like to extend that functionality to the other 
dock so all of the plots are xlinked. Is this possible? Here is a snippet 
of my code to show what I am trying, but it doesn't seem to be working.

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()


-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/bded8a55-749a-4adb-959c-55b9e86d63c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to