You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a relatively minor issue, but I've noticed that when I pull in some natural earth features to plot, such as states, coastlines, etc, that even when I set the linewidth of all features to be the same (in this case 0.5), I still end up with inconsistencies in the line size plotted (notice the difference in state boundary size vs the border between US and Mexico in the attached image).
I believe this is because when features overlap, and are plotted on top of one another, the line size will increase even if it is the same. I guess the way to get around this would be to use a GIS program to merge all the features you want to plot into a single shapefile .
It would be nice for cartopy to have a built in tool to keep the line size consistent - either through merging features or preventing plotting of overlapping features. That was one of the nicest things about Basemap - the states, counties, counties, and coastline were baked-in, and didn't cause any issue with overlap and incorrect sizing.
So, I don't think it's a problem with the map information--these data all come from the Natural Earth datasets, and I think all of those datasets are consistent with themselves.
I think what you're seeing is:
50m scale is a bit overkill at this map extent, and the high resolution coastlines just become big blobs of black.
I can reproduce some darker lines when I go to 110m scale. In this case, I think what you're seeing is an artifact of your 0.5 linewidth. At that fine of a line, I think the renderer has to use some transparency to produce smooth (anti-aliased) lines. When multiple of those lines is drawn on top of each other, the partially transparent pixels add together and produce darker spots. Actually, the fact that all of those lines are so perfectly darker means the map information is lining up perfectly.
You can see the difference if you pass antialiased=False to coastlines and add_feature. If you do so, then the map looks like this:
So, not an issue with the natural earth map information as far as I can tell, but if I'm mistaken please do show me.
I also wanted to note that you could simplify your code above by using cartopy's built in cartopy.feature.STATES rather than manually making an instance of NaturalEarthFeature.
Description
This is a relatively minor issue, but I've noticed that when I pull in some natural earth features to plot, such as states, coastlines, etc, that even when I set the linewidth of all features to be the same (in this case 0.5), I still end up with inconsistencies in the line size plotted (notice the difference in state boundary size vs the border between US and Mexico in the attached image).
I believe this is because when features overlap, and are plotted on top of one another, the line size will increase even if it is the same. I guess the way to get around this would be to use a GIS program to merge all the features you want to plot into a single shapefile .
It would be nice for cartopy to have a built in tool to keep the line size consistent - either through merging features or preventing plotting of overlapping features. That was one of the nicest things about Basemap - the states, counties, counties, and coastline were baked-in, and didn't cause any issue with overlap and incorrect sizing.
Code to reproduce
The text was updated successfully, but these errors were encountered: