def updateViews(self):
""" Keep plot views for left and right axis identical when resizing the plot widget. """
# view has resized; update auxiliary views to match
self.plot2.setGeometry(self.plot1.vb.sceneBoundingRect())
# need to re-update linked axes since this was called incorrectly while views had different
# shapes. (probably this should be handled in ViewBox.resizeEvent)
self.plot2.linkedViewChanged(self.plot1.vb, self.plot2.XAxis)
评论列表
文章目录