Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default styler fills LineStrings #1782

Open
kdpenner opened this issue May 9, 2021 · 1 comment · May be fixed by #1790
Open

Default styler fills LineStrings #1782

kdpenner opened this issue May 9, 2021 · 1 comment · May be fixed by #1790

Comments

@kdpenner
Copy link
Contributor

kdpenner commented May 9, 2021

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

@greglucas
Copy link
Contributor

I agree with you, I thought there were some other issues mentioning this brought up a while ago, but I can't find them now. It doesn't seem like it would be too hard to change the defaults around with an isinstance(LineString) check when adding features.

@smartlixx smartlixx linked a pull request May 17, 2021 that will close this issue
@dopplershift dopplershift modified the milestones: 0.20, 0.21 Sep 17, 2021
@QuLogic QuLogic modified the milestones: 0.21, 0.22 Sep 11, 2022
@dopplershift dopplershift modified the milestones: 0.22, Next Release Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants