pyvista.plotting.themes.Theme.allow_empty_mesh

pyvista.plotting.themes.Theme.allow_empty_mesh#

property Theme.allow_empty_mesh: bool[source]#

Return or set whether to allow plotting empty meshes.

Examples

Enable plotting of empty meshes.

>>> import pyvista as pv
>>> pv.global_theme.allow_empty_mesh = True

Now add an empty mesh to a plotter

>>> pl = pv.Plotter()
>>> _ = pl.add_mesh(pv.PolyData())
>>> pl.show()  
../../../_images/pyvista-plotting-themes-Theme-allow_empty_mesh-1_00_00.png