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 of1.0is totally opaque and0.0is completely transparent.
Examples#
Download Python source code | Download Jupyter notebook
Get the default opacity and visualize it.
>>> import pyvista as pv
>>> prop = pv.Property()
>>> prop.opacity
1.0
>>> prop.plot()
Visualize an opacity value of 0.75.
>>> prop.opacity = 0.75
>>> prop.plot()
Visualize an opacity of 0.25.
>>> prop.opacity = 0.25
>>> prop.plot()