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
Apologies if this turns out to be a cartopy issue (I'm not deeply familiar with cartopy), but after digging around, I can't find anyone else running into it.
I'm hitting two odd edge cases where setting projection=gcrs.OSGB() creates a blank plot, but AlbersEqualArea() plots fine.
A GeoDataFrame read from the following (Great Britain and Northern Ireland borders), dropping Northern Ireland with .dropna([11]) plots when extent is set but not when it's omitted. AlbersEqualArea() plots fine without extent.
Setting the previous to ax= and tacking on the following KDEPlot creates a blank plot if clip=uk_borders_partial (Northern Ireland is dropped). Using the full GeoDataFrame or any subset of the full GeoDataFrame that does not drop Northern Ireland, e.g. uk_borders_full[5:12], plots exactly as expected. The code, with Ireland dropped, also plots as expected with AlbersEqualArea(). Just not with OSGB().
That is some really weird behavior! gcrs.OSGB() is a thin wrapper around the cartopyOSGB projection, so I'd implicate cartopy in these problem. Thanks for bringing a repro, I'll try to fiddle with it something. Sadly I'm not a cartopy expert, and the lifetime of the geoplot library has been filled with occasional and inexplicable quirks like this one, so I don't know how helpful I can be.
Apologies if this turns out to be a cartopy issue (I'm not deeply familiar with cartopy), but after digging around, I can't find anyone else running into it.
I'm hitting two odd edge cases where setting
projection=gcrs.OSGB()
creates a blank plot, butAlbersEqualArea()
plots fine..dropna([11])
plots whenextent
is set but not when it's omitted.AlbersEqualArea()
plots fine withoutextent.
ax=
and tacking on the following KDEPlot creates a blank plot ifclip=uk_borders_partial
(Northern Ireland is dropped). Using the full GeoDataFrame or any subset of the full GeoDataFrame that does not drop Northern Ireland, e.g.uk_borders_full[5:12]
, plots exactly as expected. The code, with Ireland dropped, also plots as expected withAlbersEqualArea()
. Just not withOSGB()
.Would the latter be an issue with how
clip
gets passed to seaborn kdeplot?Thank you for your help, and for this beautiful library.
The text was updated successfully, but these errors were encountered: