skspatial.objects.Cylinder.plot_3d¶
- Cylinder.plot_3d(ax_3d, n_along_axis: int = 100, n_angles: int = 30, **kwargs) None[source]¶
Plot a 3D cylinder.
- Parameters:
- ax_3dAxes3D
Instance of
Axes3D.- n_along_axisint
Number of intervals along the axis of the cylinder.
- n_anglesint
Number of angles distributed around the circle.
- kwargsdict, optional
Additional keywords passed to
plot_surface().
Examples
>>> import matplotlib.pyplot as plt >>> from mpl_toolkits.mplot3d import Axes3D
>>> from skspatial.objects import Cylinder
>>> fig = plt.figure() >>> ax = fig.add_subplot(111, projection='3d')
>>> cylinder = Cylinder([5, 3, 1], [1, 0, 1], 2)
>>> cylinder.plot_3d(ax, alpha=0.2) >>> cylinder.point.plot_3d(ax, s=100)
(
Source code,png,hires.png,pdf)