pyvista.DataObject.copy_attributes#

DataObject.copy_attributes(dataset: vtkDataSet)[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)
https://d33wubrfki0l68.cloudfront.net/c9daca0d1a6e0e8a93a0e9f85973bd01d52019bb/8a78e/_images/pyvista-dataobject-copy_attributes-1_00_00.png