scale#

PointSet.scale(xyz: Union[list, tuple, ndarray], transform_all_input_vectors=False, inplace=None)#

Scale the mesh.

Parameters
xyzlist or tuple or numpy.ndarray

Scale factor in x, y, and z directions. Length 3 list, tuple or array.

transform_all_input_vectorsbool, optional

When True, all input vectors are transformed. Otherwise, only the points, normals and active vectors are transformed. This is only valid when not updating in place.

inplacebool, optional

Updates mesh in-place.

Returns
pyvista.PointSet

Scaled pointset.

Notes

transform_all_input_vectors is not handled when modifying inplace.

Examples

>>> import pyvista
>>> from pyvista import examples
>>> pl = pyvista.Plotter(shape=(1, 2))
>>> pl.subplot(0, 0)
>>> pl.show_axes()
>>> _ = pl.show_grid()
>>> mesh1 = examples.download_teapot()
>>> _ = pl.add_mesh(mesh1)
>>> pl.subplot(0, 1)
>>> pl.show_axes()
>>> _ = pl.show_grid()
>>> mesh2 = mesh1.scale([10.0, 10.0, 10.0], inplace=False)
>>> _ = pl.add_mesh(mesh2)
>>> pl.show(cpos="xy")
../../../_images/pyvista-PointSet-scale-1_00_00.png