Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Closed
Description
Bug report
Bug summary
pcolor() produces a deprecation warning with default settings.
The default ofrcParams['pcolor.shading'] seems to be'flat', which is deprecated (at least sometimes). Maybe the default should be changed to'auto' or'nearest'?
Code for reproduction
frommatplotlibimportpyplotaspltimportnumpyasnpx=np.arange(2.)y=np.arange(2.)z=np.ones([2,2])plt.pcolor(x,y,z)
Actual outcome
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)Expected outcome
No warning
Matplotlib version
- Operating system: Linux Mint 19
- Matplotlib version: 3.3.2
- Matplotlib backend (
print(matplotlib.get_backend())): Qt5Agg - Python version: 3.7.6
- Jupyter version (if applicable): N/A
- Other libraries: None
Installed with conda from conda-forge
Metadata
Metadata
Assignees
Labels
No labels