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 as pv
>>> pl = pv.Plotter(lighting=None)
>>> pl.enable_lightkit()
>>> actor = pl.add_mesh(pv.Cube(), show_edges=True)
>>> pl.show()
https://d33wubrfki0l68.cloudfront.net/252bf6ea519e691e53975e9989f09c902b152402/c2741/_images/pyvista-plotter-enable_lightkit-1_00_00.png