plot_arrows#
- plot_arrows(cent, direction, **kwargs)[source]#
Plot arrows as vectors.
- Parameters
- cent
numpy.ndarray
Accepts a single 3d point or array of 3d points.
- direction
numpy.ndarray
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()
.
- cent
- Returns
tuple
See the returns of
pyvista.plot()
.
See also
Examples
Plot a single random arrow.
>>> import numpy as np >>> import pyvista >>> cent = np.random.random(3) >>> direction = np.random.random(3) >>> pyvista.plot_arrows(cent, direction)
Plot 100 random arrows.
>>> import numpy as np >>> import pyvista >>> cent = np.random.random((100, 3)) >>> direction = np.random.random((100, 3)) >>> pyvista.plot_arrows(cent, direction)