pyvista.plot_arrows#
- plot_arrows(cent, direction, **kwargs)[source]#
Plot arrows as vectors.
- Parameters:
- centarray_like[
float] Accepts a single 3d point or array of 3d points.
- directionarray_like[
float] Accepts a single 3d point or array of 3d vectors. Must contain the same number of items as
cent.- **kwargs
dict,optional See
pyvista.plot().
- centarray_like[
- Returns:
tupleSee the returns of
pyvista.plot().
See also
Examples
Plot a single random arrow.
>>> import numpy as np >>> import pyvista as pv >>> rng = np.random.default_rng(seed=0) >>> cent = rng.random(3) >>> direction = rng.random(3) >>> pv.plot_arrows(cent, direction)
Plot 100 random arrows.
>>> import numpy as np >>> import pyvista as pv >>> cent = rng.random((100, 3)) >>> direction = rng.random((100, 3)) >>> pv.plot_arrows(cent, direction)