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
Plotting inconsistencies with Cartopy #3169
Comments
I agree, this is unfortunate. I suspect the source of the discrepancy is that we use a totally different codepath if either |
* fix facecolor plot * temp version * finish fix facecolor + solves #3169 * black formatting * add testing * allow cartopy projection to be a kwarg * fix PEP8 comment * black formatting * fix testing, plt not in parameterize * fix testing, allows for no matplotlib * black formating * fix tests without matplotlib * fix some mistakes * isort, mypy * fix mypy * remove empty line * correction from review * correction from 2nd review * updated tests * updated tests * black formatting * follow up correction from review * fix tests * fix tests again * fix bug in tests * fix pb in tests * remove useless line * clean up tests * fix * Add whats-new Co-authored-by: dcherian <deepak@cherian.net>
I think this is fixed in the latest master.
However if you try iterating over the axes, it will crash because
|
As a workaround you can use: p = da.isel(time=[0]).plot.pcolormesh(
col="time",
transform=ccrs.PlateCarree(),
subplot_kws={'projection': ccrs.Orthographic(-80, 35)}
) Note the Line 163 in 8fab5a2
|
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the |
I'm on xarray 0.11.3, and currently do not have the possibility to test on master. However, the commit history suggests that this issue still exists. Please accept my apologies if I missed something.
I'm following the plotting documentation at https://xarray.pydata.org/en/stable/plotting.html#maps
When plotting two maps in the same call (exactly as written in the documentation),
everything works fine.
However, when I only want to plot one map,
I get the following error:
It is not clear (from the user perspective) why one should work and the other should not.
Of course I can create the axes instance before using xarray's
plot
function, but it would be nicer if I wouldn't have to.The text was updated successfully, but these errors were encountered: