MCPcopy Index your code
hub / github.com/shapely/shapely / plot_points

Function plot_points

shapely/plotting.py:191–222  ·  view source on GitHub ↗

Plot a Point/MultiPoint or the vertices of any other geometry type. Parameters ---------- geom : shapely.Geometry Any shapely Geometry object, from which all vertices are extracted and plotted. ax : matplotlib Axes, default None The axes on which to draw the

(geom, ax=None, color=None, marker="o", **kwargs)

Source from the content-addressed store, hash-verified

189
190
191def plot_points(geom, ax=None, color=None, marker="o", **kwargs):
192 """Plot a Point/MultiPoint or the vertices of any other geometry type.
193
194 Parameters
195 ----------
196 geom : shapely.Geometry
197 Any shapely Geometry object, from which all vertices are extracted
198 and plotted.
199 ax : matplotlib Axes, default None
200 The axes on which to draw the plot. If not specified, will get the
201 current active axes or create a new figure.
202 color : matplotlib color specification
203 Color for the filled points. You can use `markeredgecolor` and
204 `markerfacecolor` to have different edge and fill colors.
205 marker : str, default "o"
206 The matplotlib marker for the points.
207 **kwargs
208 Additional keyword arguments passed to matplotlib `plot` (Line2D).
209
210 Returns
211 -------
212 Matplotlib artist (Line2D)
213
214 """
215 if ax is None:
216 ax = _default_ax()
217
218 coords = shapely.get_coordinates(geom)
219 (line,) = ax.plot(
220 coords[:, 0], coords[:, 1], linestyle="", marker=marker, color=color, **kwargs
221 )
222 return line

Callers 15

test_plot_pointsFunction · 0.90
multipolygon.pyFile · 0.90
polygon.pyFile · 0.90
linestring.pyFile · 0.90
triangulate.pyFile · 0.90
parallel_offset.pyFile · 0.90
polygon2.pyFile · 0.90
convex_hull.pyFile · 0.90

Calls 1

_default_axFunction · 0.85

Tested by 1

test_plot_pointsFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…