Title: pcolor deprecation warning with default settings · Issue #18546 · matplotlib/matplotlib · GitHub
Open Graph Title: pcolor deprecation warning with default settings · Issue #18546 · matplotlib/matplotlib
X Title: pcolor deprecation warning with default settings · Issue #18546 · matplotlib/matplotlib
Description: Bug report Bug summary 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' o...
Open Graph Description: Bug report Bug summary 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 t...
X Description: Bug report Bug summary pcolor() produces a deprecation warning with default settings. The default of rcParams['pcolor.shading'] seems to be 'flat', which is deprecated (at least som...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/18546
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pcolor deprecation warning with default settings","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\n`pcolor()` produces a deprecation warning with default settings.\r\n\r\nThe 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'`?\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nfrom matplotlib import pyplot as plt\r\nimport numpy as np\r\n\r\nx = np.arange(2.)\r\ny = np.arange(2.)\r\nz = np.ones([2,2])\r\n\r\nplt.pcolor(x,y,z)\r\n```\r\n\r\n**Actual outcome**\r\n\r\n```\r\nMatplotlibDeprecationWarning: 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.\r\n plt.pcolor(x,y,z)\r\n```\r\n\r\n**Expected outcome**\r\n\r\nNo warning\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: Linux Mint 19\r\n * Matplotlib version: 3.3.2\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): Qt5Agg\r\n * Python version: 3.7.6\r\n * Jupyter version (if applicable): N/A\r\n * Other libraries: None\r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\nInstalled with conda from conda-forge\r\n","author":{"url":"https://github.com/johnomotani","@type":"Person","name":"johnomotani"},"datePublished":"2020-09-22T20:14:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/18546/matplotlib/issues/18546"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1912f942-cf71-8022-99d5-dd46eac088cb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D7DA:DFA78:3A1182:4F2F5F:6A5595D1 |
| html-safe-nonce | 3fef1411e26a27e4e04a98f1c206f72e3c799306f2802632ad1612c892f32607 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0RBOkRGQTc4OjNBMTE4Mjo0RjJGNUY6NkE1NTk1RDEiLCJ2aXNpdG9yX2lkIjoiMzQ0ODE5NzEwNTA1NTAxMjMwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8f7be80007508841c2d8879dfd324c75575a87075b69744ef99a1b7b4e3a53d3 |
| hovercard-subject-tag | issue:706662831 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/18546/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3092b73850070dc2e70852def769b89dbc1a8e345fe4a61e2a83886a274e7e43/matplotlib/matplotlib/issues/18546 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3092b73850070dc2e70852def769b89dbc1a8e345fe4a61e2a83886a274e7e43/matplotlib/matplotlib/issues/18546 |
| og:image:alt | Bug report Bug summary 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 t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | johnomotani |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | aa21baa44893467b0b640d0300538f84ca8c475b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width