Skip to content

Default styler fills LineStrings #1782

@kdpenner

Description

@kdpenner

Description

Default styler fills LineStrings. IMO this behavior is unexpected; I expect LineStrings to be plotted as line strings. The workaround is to set edgecolor and facecolor.

Code to reproduce

from shapely.geometry import LineString
import cartopy.crs as ccrs
import matplotlib.pyplot as plt


geoms = [LineString([(-40, 10), (-30, 15), (-30, 20)]),
         LineString([(-40, -10), (-30, -15), (-30, -20)])]

robin = ccrs.Robinson()

fig = plt.figure(figsize=(10, 7))
ax = fig.add_subplot(1, 1, 1, projection=robin)
ax.add_geometries(geoms, crs=ccrs.PlateCarree())
ax.coastlines()
plt.show()

t

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions