Title: QuadMesh.get_clim changed behavior in 3.3.0rc1 · Issue #17703 · matplotlib/matplotlib · GitHub
Open Graph Title: QuadMesh.get_clim changed behavior in 3.3.0rc1 · Issue #17703 · matplotlib/matplotlib
X Title: QuadMesh.get_clim changed behavior in 3.3.0rc1 · Issue #17703 · matplotlib/matplotlib
Description: Bug report Bug summary QuadMesh.get_clim() is documented as: Return the values (min, max) that are mapped to the colormap limits. Without vmin or vmax arguments to pcolormesh, this returns the data minimal and maximal values. However in ...
Open Graph Description: Bug report Bug summary QuadMesh.get_clim() is documented as: Return the values (min, max) that are mapped to the colormap limits. Without vmin or vmax arguments to pcolormesh, this returns the data...
X Description: Bug report Bug summary QuadMesh.get_clim() is documented as: Return the values (min, max) that are mapped to the colormap limits. Without vmin or vmax arguments to pcolormesh, this returns the data...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17703
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"QuadMesh.get_clim changed behavior in 3.3.0rc1","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\n`QuadMesh.get_clim()` is documented as:\r\n\u003e Return the values (min, max) that are mapped to the colormap limits.\r\n\r\nWithout `vmin` or `vmax` arguments to `pcolormesh`, this returns the data minimal and maximal values. However in the presence of only one of `vmin` or `vmax`, a change occurred between 3.2.2 and 3.3.0rc1. In 3.3.0rc1 it returns the input vmin *and* vmax, though only one of them was specified. The provided examples also happens (with slight output changes) for setting `vmax` instead of vmin.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\ndx, dy = 0.15, 0.05\r\ny, x = np.mgrid[slice(-3, 3 + dy, dy),\r\n slice(-3, 3 + dx, dx)]\r\nz = (1 - x / 2. + x ** 5 + y ** 3) * np.exp(-x ** 2 - y ** 2)\r\nz = z[:-1, :-1]\r\n\r\nf, ax = plt.subplots(1,1)\r\nax.pcolormesh(x, y, z, vmin=0)\r\nax.axis([x.min(), x.max(), y.min(), y.max()])\r\nfor mesh in ax.collections:\r\n print(mesh.get_clim())\r\n```\r\n\r\n**Actual outcome**\r\n\r\n```\r\n# 3.3.0rc1\r\n(0.0, None)\r\n```\r\n\r\n**Expected outcome**\r\n```\r\n# 3.2.2\r\n(0.0, 1.0510083319982622)\r\n```\r\n\r\n**Matplotlib version**\r\n * Operating system: MacOSX\r\n * Matplotlib version: 3.3.0rc1\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): MacOSX\r\n * Python version: 3.8.3\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 using pip\r\n","author":{"url":"https://github.com/MaozGelbart","@type":"Person","name":"MaozGelbart"},"datePublished":"2020-06-21T08:12:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/17703/matplotlib/issues/17703"}
| 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:89e1a4b2-7c8a-04c6-9edd-d31d271af261 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E19E:22DC6E:207FD67:2AF6F88:6A51EFC8 |
| html-safe-nonce | e41b21aeebcb4457f950535831ceac87ae2e9a09d8d817f1305180050b1410a3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTlFOjIyREM2RToyMDdGRDY3OjJBRjZGODg6NkE1MUVGQzgiLCJ2aXNpdG9yX2lkIjoiNDc5OTgxNTk5ODc3NjY2ODEwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 34b51eaf88f1cc162298151c008bdb2a5f65598a1592b8f01ea75642edc375a2 |
| hovercard-subject-tag | issue:642518270 |
| 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/17703/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bbb94f6777c14a6e20f98f4c25a6dcfe951493c004a5fdaac17702dece78a7cd/matplotlib/matplotlib/issues/17703 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bbb94f6777c14a6e20f98f4c25a6dcfe951493c004a5fdaac17702dece78a7cd/matplotlib/matplotlib/issues/17703 |
| og:image:alt | Bug report Bug summary QuadMesh.get_clim() is documented as: Return the values (min, max) that are mapped to the colormap limits. Without vmin or vmax arguments to pcolormesh, this returns the data... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MaozGelbart |
| 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