I am unable to set viewport to desired dimensions. Despite specifying (1980
x 1080), the resultant dimensions are (1366 x 855). The 3D examples in
pyqtgraph too do not show full screen and are located at lower left corner
only.
import pyqtgraph.opengl as gl
from PyQt5 import QtWidgets
from pyqtgraph.Qt import QtCore
app = QtWidgets.QApplication([])
view = gl.GLViewWidget()
view.opts['viewport'] = (0, 0, 1920, 1080)
view.showMaximized()
view.setMaximumSize(1920, 1080)
print ("%d %d" % (view.height() , view.width()))
view.setWindowTitle('3D Matrix Visualization')
## create three grids, add each to the view
xgrid = gl.GLGridItem()
ygrid = gl.GLGridItem()
zgrid = gl.GLGridItem()
view.addItem(xgrid)
view.addItem(ygrid)
view.addItem(zgrid)
## rotate x and y grids to face the correct direction
xgrid.rotate(90, 0, 1, 0)
ygrid.rotate(90, 1, 0, 0)
## scale each grid differently
xgrid.scale(0.2, 0.1, 0.1)
ygrid.scale(0.2, 0.1, 0.1)
zgrid.scale(0.1, 0.2, 0.1)
--
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/db5a6df7-9bd9-4493-8a8d-51b2cc84a03a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.