plot_arrows

plot_arrows(cent, direction, **kwargs)

Plot arrows as vectors.

Parameters
centnumpy.ndarray

Accepts a single 3d point or array of 3d points.

directionnumpy.ndarray

Accepts a single 3d point or array of 3d vectors. Must contain the same number of items as cent.

**kwargsdict, optional

See pyvista.plot().

Returns
tuple

See the returns of pyvista.plot().

See also

pyvista.plot()

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)
../../../_images/pyvista-plot_arrows-1_00_00.png
../../../_images/pyvista-plot_arrows-1_00_01.png