Closed FinnHoller closed 1 year ago
The trouble here is that the scene is not yet constructed when you print. You can use this hack (this needs a better solution):
g = mlab.test_plot3d()
g.scene._lift()
...
If you use the version of Mayavi from github today, you can instead use mlab.process_ui_events()
instead of g.scene._lift()
to fix the issue.
I was under the impression that Mayavi uses the "Raymond" light_mode by default, but when exporting a PNG with the 'savefig' method, the VTK lighting seems to be used.
I would like to change the light_mode inside my Python script but this seems to be impossible as the light_manager is None.
I am using following code:
Which prints 'True'. The light_manager seems to be set somewhere in the figure saving process, I am looking for a way to modify it beforehand.