-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Short description
This issue is to document an unresolved anomaly.
The ROIExamples.ipynb plot looks truncated when run on binder with QT_QPA_PLATFORM=offscreen.
Code to reproduce
Go to the following link
https://mybinder.org/v2/gh/pyqtgraph/pyqtgraph/HEAD?labpath=pyqtgraph%2Fexamples%2Fnotebooks%2FROIExamples.ipynb
and then run the notebook. The plot will seem be truncated on the right.
Expected behavior
Plot Should not be truncated.
Real behavior
Plots are truncated.
Tested environment(s)
- PyQtGraph version: master
- Qt Python binding: PyQt5 5.15
- Python version: 3.7 (binder)
- NumPy version: latest from pip
- Operating system: Ubuntu 18.04
- Installation method: binder requirements.txt
Additional context
This could be reproduced on WSL2 Ubuntu 20.04 also using QT_QPA_PLATFORM=offscreen. The truncation appears on PyQt5, PySide2 but not on PyQt6, PySide6.
In https://github.com/pyqtgraph/pyqtgraph/blob/master/pyqtgraph/jupyter/GraphicsView.py, there is a line:
self.gfxView.render(painter, self.gfxView.viewRect(), self.gfxView.rect()).
self.gfxView.rect() specifies the source rect. If I increase the size of that source rect, then more of the plot gets rendered. However the mouse coordinates will be wrong. It seems like internally the correct size of the plot has not been propagated. (Note that the unmodified value of self.gfxView.rect() is the correct size)
