-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
imshow RGB plot overlaps map borders when using projection #3687
Comments
Does this work if you use |
@dcherian Thanks, yes, this works as expected:
|
Thanks, I'm marking this as a bug. If you have the time, it would be nice if you could look into this and send in a PR. We do some RGB stuff here: Lines 632 to 642 in 8a650a1
and Lines 843 to 915 in 8a650a1
|
Thanks, I'll give it a try |
This happens in matplotlib when you pass an RGBA array. Thus the following should cause the same problem. ax = plt.subplot(projection=ccrs.Robinson())
ax.imshow(ds.isel(time=[0, 1, 4, 8]).transpose('lat', 'lon', 'time').values[-1::-1, :, :], transform=ccrs.PlateCarree()) I.e. it is an matplotlib or cartopy error. However, xarray always adds an alpha channel internally, see Lines 901 to 903 in 8a650a1
|
xarry version: '0.14.0'
matplotlib version: '3.1.1'
When I create an RGB plot using
ds.plot.imshow
with a procection, the plot overlaps the map borders:When using
ds.plot.imshow
with a single layer, the plot looks as expected:The text was updated successfully, but these errors were encountered: