我正在尝试在PyQt应用程序中使用PyQtGraph创建绘图布局。
我需要一行,其中包含两个绘图,第一个宽度为两列,第二个宽度为单个列。
阅读文档后,我认为以下类似代码可以实现:
# Create the PyQtGraph Plot area
self.view = pg.GraphicsLayoutWidget()
self.w1 = self.view.addPlot(row=1, col=1, colspan=2, title = 'Data1')
self.w2 = self.view.addPlot(row=1, col=3, colspan=1, title = 'Data2')
但是在这种情况下,我得到了两个图表区域,每个区域占窗口宽度的50%。
我做错了什么?
最好的问候,
Ben