-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
plt.pcolormesh will infer interval breaks per default #4364
Comments
I have a similar issue with nonmonotonic coordinates (mapping a 2D image to a zenith-azimuth space). Solving this is easy when using Matplotlib's API directly, since I can compute mesh coordinates by myself (on a array with one row and one column more) and supply these as |
Another consequence is that this example in the docs is now meaningless / misleading. I've just come across the series of discussions in cartopy about this issue - it looks quite complex and I'm also not sure yet what to do in xarray in the mean time.
I'm not sure what you mean by that? You can always set |
Yes indeed, but you cannot pass custom Numpy arrays as the |
Looking at some warnings in #3266 I saw that matplotlib will deprecate the old behaviour of
pcolormesh
when the shape of the data and the coordinates are equal (they silently cut a row and a column of the data). With the new behaviour they will interpolate the coordinates.This is a good thing in general - we already do this for a long time with the
infer_intervals
keyword. Unfortunately they don't check if the data is monotonic (matplotlib/matplotlib#18317) which can lead to problems for maps (SciTools/cartopy#1638). I don't think there is a need to do something right now - let's see what they think upstream.This change was introduced in mpl 3.3.0
The text was updated successfully, but these errors were encountered: