Vector.plot_3d(ax_3d: mpl_toolkits.mplot3d.axes3d.Axes3D, point: Union[numpy.ndarray, Sequence] = (0, 0, 0), scalar: float = 1, **kwargs) None[source]

Plot a 3D vector.

The vector is plotted by connecting two 3D points (the head and tail of the vector).


Instance of Axes3D.

pointarray_like, optional

Position of the vector tail (default is origin).

scalar{int, float}, optional

Value used to scale the vector (default 1).

kwargsdict, optional

Additional keywords passed to plot().


>>> import matplotlib.pyplot as plt
>>> from mpl_toolkits.mplot3d import Axes3D
>>> from skspatial.objects import Vector
>>> fig = plt.figure()
>>> ax = fig.add_subplot(111, projection='3d')
>>> Vector([-1, 1, 1]).plot_3d(ax, point=(1, 2, 3), c='r')

(Source code, png, hires.png, pdf)