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
Aside, the geom_basemap concept as a geom, at least to me, doesn't fit well with the ideas outlines in The Grammar of Graphics. Im not sure what category a basemap falls within so calling this a geom is likely conceptually incorrect. Just something to think about.
@aaraney You are right about geom_basemap. A better solution may be adding parameters to geom_map that turnon basemap. Something like.
geom_map(
basemap={
"source": ctx.providers.OpenStreetMap.Mapnik,
"crs": "EPSG:3857", # if None, the default is a value from the geodataframe
...
}
)
I hope to work on the mapping projections (supported by cartopy) later this year and I will be in a better position to think about how to add basemap support.
@nimisha-18, I was able to add a basemap by implementing a custom
geom
subtype that adds the basemap duringplotnine.ggplot
's draw phase:To use it in your example, you would just add it like any other layer:
Aside, the
geom_basemap
concept as ageom
, at least to me, doesn't fit well with the ideas outlines in The Grammar of Graphics. Im not sure what category a basemap falls within so calling this ageom
is likely conceptually incorrect. Just something to think about.Originally posted by @aaraney in #850 (reply in thread)
The text was updated successfully, but these errors were encountered: