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
{{ message }}
Repository navigation
pcolor deprecation warning with default settings #18546
pcolor() produces a deprecation warning with default settings.
The default of rcParams['pcolor.shading'] seems to be 'flat', which is deprecated (at least sometimes). Maybe the default should be changed to 'auto' or 'nearest'?
MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3. Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading']. This will become an error two minor releases later.
plt.pcolor(x,y,z)
This was purposefully done. "flat" was the previous default, and we need a deprecation period before we change it. If you wish to avoid the warning, then you can manually do what flat does in this case and drop the extra row and column:
Activity
jklymak commentedon Sep 22, 2020
This was purposefully done. "flat" was the previous default, and we need a deprecation period before we change it. If you wish to avoid the warning, then you can manually do what flat does in this case and drop the extra row and column:
See #16258 for a discussion.
I guess its a question of whether we have deprecated this long enough to change the default.
johnomotani commentedon Sep 22, 2020
OK, that makes sense. Thanks @jklymak! BTW I think the new
"nearest"is much better!