shapely.plotting.plot_line

Contents

shapely.plotting.plot_line#

plot_line(line, ax=None, add_points=True, color=None, linewidth=2, **kwargs)#

Plot a (Multi)LineString/LinearRing.

Note: this function is experimental, and mainly targeting (interactive) exploration, debugging and illustration purposes.

Parameters:
lineshapely.LineString or shapely.LinearRing
axmatplotlib Axes, default None

The axes on which to draw the plot. If not specified, will get the current active axes or create a new figure.

add_pointsbool, default True

If True, also plot the coordinates (vertices) as points.

colormatplotlib color specification

Color for the line (edgecolor under the hood) and points.

linewidthfloat, default 2

The line width for the polygon boundary.

**kwargs

Additional keyword arguments passed to the matplotlib Patch.

Returns:
Matplotlib artist (PathPatch)