Currently aspect ratios are not set and they are disturbed with every new image plot. Adding a naturalearth() overlay hides this problem, because GeoPandas sets the aspect ratio to 'equal'. Xarray provides an aspect keyword, but this is not satisfactory because it also requires setting size and can't be used with the ax keyword. We probably need wrappers around imshow, contour etc. But at least in the case imshow, ax.set_aspect needs to come after the call to imshow, something like:
Currently aspect ratios are not set and they are disturbed with every new image plot. Adding a
naturalearth()
overlay hides this problem, because GeoPandas sets the aspect ratio to'equal'
. Xarray provides anaspect
keyword, but this is not satisfactory because it also requires settingsize
and can't be used with theax
keyword. We probably need wrappers aroundimshow
,contour
etc. But at least in the caseimshow
,ax.set_aspect
needs to come after the call toimshow
, something like:I think the wrappers could also hide coordinate ticks and labels, and handle colorbars.