pyvista.DataObject.copy_attributes#

DataObject.copy_attributes(dataset: vtkDataSet) None[source]#

Copy the data attributes of the input dataset object.

Parameters:
datasetpyvista.DataSet

Dataset to copy the data attributes from.

Examples

>>> import pyvista as pv
>>> source = pv.ImageData(dimensions=(10, 10, 5))
>>> source = source.compute_cell_sizes()
>>> target = pv.ImageData(dimensions=(10, 10, 5))
>>> target.copy_attributes(source)
>>> target.plot(scalars='Volume', show_edges=True)
../../../_images/pyvista-DataObject-copy_attributes-1_00_00.png