Title: [Bug]: register_cmap deprecation message seems wrong · Issue #23719 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: register_cmap deprecation message seems wrong · Issue #23719 · matplotlib/matplotlib
X Title: [Bug]: register_cmap deprecation message seems wrong · Issue #23719 · matplotlib/matplotlib
Description: Bug summary See title Code for reproduction import matplotlib as mpl mpl.cm.register_cmap("test", mpl.colors.ListedColormap(["C0", "C1"])) Actual outcome PendingDeprecationWarning: The register_cmap function will be deprecated in a futur...
Open Graph Description: Bug summary See title Code for reproduction import matplotlib as mpl mpl.cm.register_cmap("test", mpl.colors.ListedColormap(["C0", "C1"])) Actual outcome PendingDeprecationWarning: The register_cma...
X Description: Bug summary See title Code for reproduction import matplotlib as mpl mpl.cm.register_cmap("test", mpl.colors.ListedColormap(["C0", "C1"])) Actual outcome PendingDeprec...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23719
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: register_cmap deprecation message seems wrong","articleBody":"### Bug summary\r\n\r\nSee title\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib as mpl\r\nmpl.cm.register_cmap(\"test\", mpl.colors.ListedColormap([\"C0\", \"C1\"]))\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n```\r\nPendingDeprecationWarning: The register_cmap function will be deprecated in a future version.\r\nUse ``matplotlib.colormaps.register_cmap(name)`` instead.\r\n```\r\n\r\n### Expected outcome\r\n\r\nI think there's two problems here:\r\n- The function is called `matplotlib.colormaps.register`\r\n- The signature for that function is `mpl.colormaps.register(cmap, *, name=None, force=False)`\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### Operating system\r\n\r\n_No response_\r\n\r\n### Matplotlib Version\r\n\r\n3.6.0.rc1\r\n\r\n### Matplotlib Backend\r\n\r\n_No response_\r\n\r\n### Python version\r\n\r\n_No response_\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\n_No response_","author":{"url":"https://github.com/mwaskom","@type":"Person","name":"mwaskom"},"datePublished":"2022-08-23T22:29:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/23719/matplotlib/issues/23719"}
| 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:121ffaed-0c0c-cfe8-65c4-0aebffb34397 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C47C:D1AA1:2DA890E:40FECC2:6A51166F |
| html-safe-nonce | e9f420719eac6a967c1ea5f177336d1114dd5eaa3a297764ee6c139782d596b1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDdDOkQxQUExOjJEQTg5MEU6NDBGRUNDMjo2QTUxMTY2RiIsInZpc2l0b3JfaWQiOiI4Mjc5MDQxOTczMDE4NDk4NjcxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 96176113beff8fe64d508737d4503fb75129510b75fd54830c490bdaa4813680 |
| hovercard-subject-tag | issue:1348614465 |
| 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/23719/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8e1fd1137028060f75cc3619caf3f2b7d66ef0d9404e436d060ca2a882541ed1/matplotlib/matplotlib/issues/23719 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8e1fd1137028060f75cc3619caf3f2b7d66ef0d9404e436d060ca2a882541ed1/matplotlib/matplotlib/issues/23719 |
| og:image:alt | Bug summary See title Code for reproduction import matplotlib as mpl mpl.cm.register_cmap("test", mpl.colors.ListedColormap(["C0", "C1"])) Actual outcome PendingDeprecationWarning: The register_cma... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mwaskom |
| hostname | github.com |
| expected-hostname | github.com |
| None | f0f0f3a40c5b69803a8255a8e44323880bf9c4db54d5c076f2130bedf2a1dde5 |
| 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 | 44909533816f7f99ff04e7a0fe692733af67ed84 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width