bundles / scipy 1.17.1 / scipy / spatial / _plotutils / convex_hull_plot_2d
function
scipy.spatial._plotutils:convex_hull_plot_2d
source: /scipy/spatial/_plotutils.py :78
Signature
def convex_hull_plot_2d ( hull , ax = None ) Summary
Plot the given convex hull diagram in 2-D
Parameters
hull: scipy.spatial.ConvexHull instanceConvex hull to plot
ax: matplotlib.axes.Axes instance, optionalAxes to plot on
Returns
fig: matplotlib.figure.Figure instanceFigure for the plot
Notes
Requires Matplotlib.
Examples
import numpy as np import matplotlib.pyplot as plt from scipy.spatial import ConvexHull, convex_hull_plot_2d✓
rng = np.random.default_rng() points = rng.random((30, 2)) hull = ConvexHull(points)✓
_ = convex_hull_plot_2d(hull) plt.show()✓

See also
Aliases
-
scipy.spatial.convex_hull_plot_2d