copy_attributes#

PolyData.copy_attributes(dataset: vtkDataSet)#

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.UniformGrid(dimensions=(10, 10, 5))
>>> source = source.compute_cell_sizes()
>>> target = pv.UniformGrid(dimensions=(10, 10, 5))
>>> target.copy_attributes(source)
>>> target.plot(scalars='Volume', show_edges=True)
../../../_images/pyvista-PolyData-copy_attributes-1_00_00.png