Title: [Bug]: Mismatch in documented default behaviour of pcolormesh 'snap' · Issue #30709 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Mismatch in documented default behaviour of pcolormesh 'snap' · Issue #30709 · matplotlib/matplotlib
X Title: [Bug]: Mismatch in documented default behaviour of pcolormesh 'snap' · Issue #30709 · matplotlib/matplotlib
Description: Bug summary The documentation for pcolormesh states the default behaviour for snap is False. Since a supposed temporary addition of pcolormesh.snap to the default rcParams under b38c7de for 3.4.3, this is no longer the case and instead y...
Open Graph Description: Bug summary The documentation for pcolormesh states the default behaviour for snap is False. Since a supposed temporary addition of pcolormesh.snap to the default rcParams under b38c7de for 3.4.3, ...
X Description: Bug summary The documentation for pcolormesh states the default behaviour for snap is False. Since a supposed temporary addition of pcolormesh.snap to the default rcParams under b38c7de for 3.4.3, ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/30709
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Mismatch in documented default behaviour of pcolormesh 'snap'","articleBody":"### Bug summary\n\nThe [documentation for pcolormesh](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.pcolormesh.html) states the default behaviour for **snap** is _**False**_. Since a supposed temporary addition of **pcolormesh.snap** to the default rcParams under https://github.com/matplotlib/matplotlib/commit/b38c7de4e03d6968680c439381976f8f5f4418b9 for 3.4.3, this is no longer the case and instead you get _**True**_ behaviour by default. The documentation and default behaviour should probably match.\n\nThis switch in default behaviour is most obvious when plotting a pcolormesh plot with an **alpha** value less than 1.\n\n\n\n### Code for reproduction\n\n```Python\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\ntest_array = [\n [1, 3, 5, 6, 2, 1],\n [0, 2, 4, 6, 3, 1],\n [1, 2, 4, 4, 2, 1],\n [0, 0, 2, 3, 2, 1],\n [0, 0, 1, 2, 2, 0],\n [0, 0, 1, 1, 0, 0],\n ]\n\np1 = plt.pcolormesh(test_array, alpha=0.5)\n\n#print(mpl.rcParams['pcolormesh.snap'])\nprint(\"default\", p1.get_snap())\n\nplt.savefig(f\"test_snapD_old.png\")\nplt.close()\n```\n\n### Actual outcome\n\nUnder 3.10.1\n```\nTrue\ndefault True\n```\n\n\u003cimg width=\"640\" height=\"480\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/e4c20bdc-720a-40ed-86ed-d72845a08e98\" /\u003e\n\n### Expected outcome\n\nUnder 3.3.4\n```\ndefault None\n```\n\n\u003cimg width=\"640\" height=\"480\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b153f5a0-32c5-47c7-aa83-343c70afe430\" /\u003e\n\n### Additional information\n\nEither the temporary rcParam should be removed from the default template or the documentation should be changed to match the present default behaviour.\n\n### Operating system\n\n_No response_\n\n### Matplotlib Version\n\n3.10.1\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\n_No response_\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nNone","author":{"url":"https://github.com/mo-nstebbin","@type":"Person","name":"mo-nstebbin"},"datePublished":"2025-10-31T13:20:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/30709/matplotlib/issues/30709"}
| 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:ff401eab-af46-ff29-974e-9b26255ffcaa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FBA:147377:450FBA:5C2A10:6A51C59F |
| html-safe-nonce | 6be3499501024d701bb8f8acbaa75eff7a0c6404a46ea9c17fb2a6991c9602ec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkJBOjE0NzM3Nzo0NTBGQkE6NUMyQTEwOjZBNTFDNTlGIiwidmlzaXRvcl9pZCI6IjQ3ODY3MjIyNzk4NzM2OTMwODciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e63ddd7fcc5e7e7eedc8f61e9f1dbafa7f56e1b7d92c0ae0972d56f33d732830 |
| hovercard-subject-tag | issue:3574933702 |
| 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/30709/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ac92526ecf748b58d5c978d18b47da2ae420c87297290c6c51391b5dce0351a2/matplotlib/matplotlib/issues/30709 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ac92526ecf748b58d5c978d18b47da2ae420c87297290c6c51391b5dce0351a2/matplotlib/matplotlib/issues/30709 |
| og:image:alt | Bug summary The documentation for pcolormesh states the default behaviour for snap is False. Since a supposed temporary addition of pcolormesh.snap to the default rcParams under b38c7de for 3.4.3, ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mo-nstebbin |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width