pyvista.DataSet.get_data_range

pyvista.DataSet.get_data_range#

DataSet.get_data_range(
arr_var: str | NumpyArray[float] | None = None,
preference: PointLiteral | CellLiteral | FieldLiteral = 'cell',
) tuple[float, float][source]#

Get the min and max of a named array.

Parameters:
arr_varstr, np.ndarray, optional

The name of the array to get the range. If None, the active scalars is used.

preferencestr, default: “cell”

When scalars is specified, this is the preferred array type to search for in the dataset. Must be either 'point', 'cell', or 'field'.

Returns:
tuple

(min, max) of the named array.