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)