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()
../../../_images/pyvista-Plotter-enable_lightkit-1_00_00.png