I guess the solution is quite easy. However I can't find any example on how to change the window size of the mayavi renderer.
sample code:
import numpy as np
from tvtk.api import tvtk
from mayavi import mlab
points = np.random.normal(0, 1, (1000, 3))
ug = tvtk.UnstructuredGrid(points=points)
ug.point_data.scalars = np.sqrt(np.sum(points**2, axis=1))
ug.point_data.scalars.name = "value"
ds = mlab.pipeline.add_dataset(ug)
delaunay = mlab.pipeline.delaunay3d(ds)
iso = mlab.pipeline.iso_surface(delaunay)
iso.actor.property.opacity = 0.1
iso.contour.number_of_contours = 10
mlab.show()
I've tried the following:
scene=mlab.gcf().scene
scene.set_size((600,600))
nothing changes.
best regards and thanks in advance...
fig = mlab.figure(size=(600,600))
#then the rest of your code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With