copy_attributes

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