change examples to use setCameraPosition
This commit is contained in:
parent
6ca81fdddb
commit
e10dbfd9e1
|
@ -13,9 +13,9 @@ import numpy as np
|
||||||
|
|
||||||
app = pg.mkQApp("GLBarGraphItem Example")
|
app = pg.mkQApp("GLBarGraphItem Example")
|
||||||
w = gl.GLViewWidget()
|
w = gl.GLViewWidget()
|
||||||
w.opts['distance'] = 40
|
|
||||||
w.show()
|
w.show()
|
||||||
w.setWindowTitle('pyqtgraph example: GLBarGraphItem')
|
w.setWindowTitle('pyqtgraph example: GLBarGraphItem')
|
||||||
|
w.setCameraPosition(distance=40)
|
||||||
|
|
||||||
gx = gl.GLGridItem()
|
gx = gl.GLGridItem()
|
||||||
gx.rotate(90, 0, 1, 0)
|
gx.rotate(90, 0, 1, 0)
|
||||||
|
|
|
@ -15,9 +15,9 @@ import numpy as np
|
||||||
|
|
||||||
app = pg.mkQApp("GLImageItem Example")
|
app = pg.mkQApp("GLImageItem Example")
|
||||||
w = gl.GLViewWidget()
|
w = gl.GLViewWidget()
|
||||||
w.opts['distance'] = 200
|
|
||||||
w.show()
|
w.show()
|
||||||
w.setWindowTitle('pyqtgraph example: GLImageItem')
|
w.setWindowTitle('pyqtgraph example: GLImageItem')
|
||||||
|
w.setCameraPosition(distance=200)
|
||||||
|
|
||||||
## create volume data set to slice three images from
|
## create volume data set to slice three images from
|
||||||
shape = (100,100,70)
|
shape = (100,100,70)
|
||||||
|
|
|
@ -13,9 +13,9 @@ import numpy as np
|
||||||
|
|
||||||
app = pg.mkQApp("GLLinePlotItem Example")
|
app = pg.mkQApp("GLLinePlotItem Example")
|
||||||
w = gl.GLViewWidget()
|
w = gl.GLViewWidget()
|
||||||
w.opts['distance'] = 40
|
|
||||||
w.show()
|
w.show()
|
||||||
w.setWindowTitle('pyqtgraph example: GLLinePlotItem')
|
w.setWindowTitle('pyqtgraph example: GLLinePlotItem')
|
||||||
|
w.setCameraPosition(distance=40)
|
||||||
|
|
||||||
gx = gl.GLGridItem()
|
gx = gl.GLGridItem()
|
||||||
gx.rotate(90, 0, 1, 0)
|
gx.rotate(90, 0, 1, 0)
|
||||||
|
|
|
@ -15,9 +15,9 @@ import numpy as np
|
||||||
|
|
||||||
app = pg.mkQApp("GLScatterPlotItem Example")
|
app = pg.mkQApp("GLScatterPlotItem Example")
|
||||||
w = gl.GLViewWidget()
|
w = gl.GLViewWidget()
|
||||||
w.opts['distance'] = 20
|
|
||||||
w.show()
|
w.show()
|
||||||
w.setWindowTitle('pyqtgraph example: GLScatterPlotItem')
|
w.setWindowTitle('pyqtgraph example: GLScatterPlotItem')
|
||||||
|
w.setCameraPosition(distance=20)
|
||||||
|
|
||||||
g = gl.GLGridItem()
|
g = gl.GLGridItem()
|
||||||
w.addItem(g)
|
w.addItem(g)
|
||||||
|
|
|
@ -11,9 +11,9 @@ import pyqtgraph.opengl as gl
|
||||||
|
|
||||||
pg.mkQApp("GLViewWidget Example")
|
pg.mkQApp("GLViewWidget Example")
|
||||||
w = gl.GLViewWidget()
|
w = gl.GLViewWidget()
|
||||||
w.opts['distance'] = 20
|
|
||||||
w.show()
|
w.show()
|
||||||
w.setWindowTitle('pyqtgraph example: GLViewWidget')
|
w.setWindowTitle('pyqtgraph example: GLViewWidget')
|
||||||
|
w.setCameraPosition(distance=20)
|
||||||
|
|
||||||
ax = gl.GLAxisItem()
|
ax = gl.GLAxisItem()
|
||||||
ax.setSize(5,5,5)
|
ax.setSize(5,5,5)
|
||||||
|
|
|
@ -14,9 +14,9 @@ from pyqtgraph import functions as fn
|
||||||
|
|
||||||
app = pg.mkQApp("GLVolumeItem Example")
|
app = pg.mkQApp("GLVolumeItem Example")
|
||||||
w = gl.GLViewWidget()
|
w = gl.GLViewWidget()
|
||||||
w.opts['distance'] = 200
|
|
||||||
w.show()
|
w.show()
|
||||||
w.setWindowTitle('pyqtgraph example: GLVolumeItem')
|
w.setWindowTitle('pyqtgraph example: GLVolumeItem')
|
||||||
|
w.setCameraPosition(distance=200)
|
||||||
|
|
||||||
g = gl.GLGridItem()
|
g = gl.GLGridItem()
|
||||||
g.scale(10, 10, 1)
|
g.scale(10, 10, 1)
|
||||||
|
|
Loading…
Reference in New Issue