skspatial.objects.Sphere.plot_3d¶
- Sphere.plot_3d(ax_3d: Axes3D, n_angles: int = 30, **kwargs) None [source]¶
Plot the sphere in 3D.
- Parameters:
- ax_3dAxes3D
Instance of
Axes3D
.- kwargsdict, optional
Additional keywords passed to
plot_surface()
.
Examples
>>> import matplotlib.pyplot as plt >>> from mpl_toolkits.mplot3d import Axes3D
>>> from skspatial.objects import Sphere
>>> fig = plt.figure() >>> ax = fig.add_subplot(111, projection='3d')
>>> sphere = Sphere([1, 2, 3], 2)
>>> sphere.plot_3d(ax, alpha=0.2) >>> sphere.point.plot_3d(ax, s=100)
(
Source code
,png
,hires.png
,pdf
)