Hello all,
I want to use have multiple plots with only one X axis, as shown in the 
GraphicsLayout example, where it seems to work as expected. But when I try 
it myself, the ViewBoxes of the items have different sizes, while I want 
(and would expect) the ViewBoxes to have the same size for all plots. I 
think it might be related to the size of the window - if the ViewBox is 
small, it seems to be correct, only if it grows, it gets out of proportion.
What am I doing wrong? How can I avoid this behavior?
Thanks,
Jo


import sys
from PySide2.QtWidgets import QApplication
import pyqtgraph as pg

if __name__ == "__main__":
    app = QApplication(sys.argv)
    win = pg.GraphicsLayoutWidget(border=(50, 0, 0))
    p1 = win.addPlot(y=[1, 3, 2])
    win.nextRow()
    p2 = win.addPlot(y=[3, 1, 2])
    p1.showAxis('bottom', False) # leaving this out makes the ViewBoxes 
same size
    win.show()
    sys.exit(app.exec_()) 


  [image: viewbox_size.png] 

-- 
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/a3447ced-0804-44cf-9a6a-f8daa13f1d0en%40googlegroups.com.

Reply via email to