pyvista.Plotter.enable_lightkit#

Plotter.enable_lightkit(only_active=False)[source]#

Enable the default light-kit lighting.

See: https://www.researchgate.net/publication/2926068_LightKit_A_lighting_system_for_effective_visualization

This will replace all pre-existing lights in the renderer.

Parameters:
only_activebool, default: False

If True, only change the active renderer. The default is that every renderer is affected.

Examples

Create a plotter without any lights and then enable the default light kit.

>>> import pyvista
>>> pl = pyvista.Plotter(lighting=None)
>>> pl.enable_lightkit()
>>> actor = pl.add_mesh(pyvista.Cube(), show_edges=True)
>>> pl.show()
https://d33wubrfki0l68.cloudfront.net/e149db74c1a1539c543fbfcbe5a9322d1c1e3049/cb2a6/_images/pyvista-plotter-enable_lightkit-1_00_00.png