pyvista.Property.opacity#

property Property.opacity: float[source]#

Return or set the opacity of this property.

The opacity is applied to the surface uniformly.

Property has range [0.0, 1.0]. A value of 1.0 is totally opaque and 0.0 is completely transparent.

Examples

Get the default opacity and visualize it.

>>> import pyvista as pv
>>> prop = pv.Property()
>>> prop.opacity
1.0
>>> prop.plot()
../../../_images/pyvista-Property-opacity-1_00_00.png

Visualize an opacity value of 0.75.

>>> prop.opacity = 0.75
>>> prop.plot()
../../../_images/pyvista-Property-opacity-1_01_00.png

Visualize an opacity of 0.25.

>>> prop.opacity = 0.25
>>> prop.plot()
../../../_images/pyvista-Property-opacity-1_02_00.png