skspatial.objects.Line.plot_3d¶
- Line.plot_3d(ax_3d: Axes3D, t_1: float = 0, t_2: float = 1, **kwargs) None [source]¶
Plot a 3D line.
The line is plotted by connecting two 3D points.
- Parameters:
- ax_3dAxes3D
Instance of
Axes3D
.- t_1, t_2{int, float}
Parameters to determine points 1 and 2 along the line. These are passed to
Line.to_point()
. Defaults are 0 and 1.- kwargsdict, optional
Additional keywords passed to
plot()
.
Examples
>>> import matplotlib.pyplot as plt >>> from mpl_toolkits.mplot3d import Axes3D
>>> from skspatial.objects import Line
>>> fig = plt.figure() >>> ax = fig.add_subplot(111, projection='3d')
>>> line = Line([1, 2, 3], [0, 1, 1])
>>> line.plot_3d(ax, c='k') >>> line.point.plot_3d(ax, s=100)
(
Source code
,png
,hires.png
,pdf
)