pyvista.plotting.volume.Volume.copy#
- Volume.copy(deep: bool = True) Self [source]#
Create a copy of this volume.
- Parameters:
- Returns:
Volume
Deep or shallow copy of this volume.
Examples
Create a volume of by adding it to a
Plotter
and then copy the volume.>>> import pyvista as pv >>> mesh = pv.Wavelet() >>> pl = pv.Plotter() >>> volume = pl.add_volume(mesh, diffuse=0.5) >>> new_volume = volume.copy()
Change the copy’s properties. A deep copy is made by default, so the original volume is not affected.
>>> new_volume.prop.diffuse = 1.0 >>> new_volume.prop.diffuse 1.0
>>> volume.prop.diffuse 0.5