If I run the code without changing viewport settings, the parent window, by 
the virtue of showMaximized(), appears full screen. But the drawable area 
is confined to 1/4 of the screen in the lower left corner. 

view.opts['viewport'] =  (0, 0, 1920, 1080)


Using above code, does make drawable area larger but then it is not large 
enough to cover maximized screen. It is 1366x855. The grid/axis appears in 
upper right corner and not in the center of 1366x855. In the default mode, 
the grid/axis appears in the center of the 1/4 drawable area.

Any help is appreciated.


On Monday, July 10, 2017 at 1:52:16 AM UTC-7, [email protected] wrote:
>
> 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/195da735-b830-4db9-b880-9dcb6a228619%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to