Title: [Bug]: mpl.colormaps[ "Grays" ].name is "Greys", not "Grays" · Issue #28114 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: mpl.colormaps[ "Grays" ].name is "Greys", not "Grays" · Issue #28114 · matplotlib/matplotlib
X Title: [Bug]: mpl.colormaps[ "Grays" ].name is "Greys", not "Grays" · Issue #28114 · matplotlib/matplotlib
Description: Bug summary A minor bug, with a simple fix: mpl.colormaps[ "Grays" ].name is "Greys", not "Greys" Code for reproduction print( f'{mpl.colormaps[ "Grays" ].name = }' ) # Greys Actual outcome mpl.colormaps[ "Grays" ].name = 'Greys' Expecte...
Open Graph Description: Bug summary A minor bug, with a simple fix: mpl.colormaps[ "Grays" ].name is "Greys", not "Greys" Code for reproduction print( f'{mpl.colormaps[ "Grays" ].name = }' ) # Greys Actual outcome mpl.col...
X Description: Bug summary A minor bug, with a simple fix: mpl.colormaps[ "Grays" ].name is "Greys", not "Greys" Code for reproduction print( f'{mpl.colormaps[ "Grays" ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/28114
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: mpl.colormaps[ \"Grays\" ].name is \"Greys\", not \"Grays\"","articleBody":"### Bug summary\n\nA minor bug, with a simple fix: `mpl.colormaps[ \"Grays\" ].name` is \"Greys\", not \"Greys\"\n\n### Code for reproduction\n\n```Python\nprint( f'{mpl.colormaps[ \"Grays\" ].name = }' ) # Greys\n```\n\n\n### Actual outcome\n\nmpl.colormaps[ \"Grays\" ].name = 'Greys'\n\n### Expected outcome\n\nmpl.colormaps[ \"Grays\" ].name = 'Grays'\n\n### Additional information\n\nA suggested fix: in [cm.py](https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/cm.py), after lines 47 - 50\r\n```\r\n# Register colormap aliases for gray and grey.\r\ncmap_d['grey'] = cmap_d['gray']\r\ncmap_d['gist_grey'] = cmap_d['gist_gray']\r\ncmap_d['gist_yerg'] = cmap_d['gist_yarg']\r\ncmap_d['Grays'] = cmap_d['Greys']\r\n```\r\nchange their .name s too:\r\n```\r\ncmap_d['grey'].name = 'grey'\r\ncmap_d['gist_grey'].name = 'gist_grey'\r\ncmap_d['gist_yerg'].name = 'gist_yerg'\r\ncmap_d['Grays'].name = 'Grays'\r\n```\n\n### Operating system\n\nmacos 10.15.7\n\n### Matplotlib Version\n\n3.8.4\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\n3.10.0\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/denis-bz","@type":"Person","name":"denis-bz"},"datePublished":"2024-04-21T15:44:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/28114/matplotlib/issues/28114"}
| 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:a33a48e1-28df-3006-57eb-a07fe064e21c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C788:1F8C21:D70668:120D2B7:6A52A5BC |
| html-safe-nonce | a6663a3fe84e34bc535485f03c9bdccb239aee548a857900b128feb9af41f6e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzg4OjFGOEMyMTpENzA2Njg6MTIwRDJCNzo2QTUyQTVCQyIsInZpc2l0b3JfaWQiOiI3NjEyNTU2ODYyNTI0Mzg5NzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0aba80aed176b8c5d95a5c26aee8765eb6453f63890b076476723664bb00364e |
| hovercard-subject-tag | issue:2255140345 |
| 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/28114/issue_layout |
| twitter:image | https://opengraph.githubassets.com/be3c36080904a501a645ebad35f6927519f081c2664785fe4a6c1f1d871a1d3c/matplotlib/matplotlib/issues/28114 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/be3c36080904a501a645ebad35f6927519f081c2664785fe4a6c1f1d871a1d3c/matplotlib/matplotlib/issues/28114 |
| og:image:alt | Bug summary A minor bug, with a simple fix: mpl.colormaps[ "Grays" ].name is "Greys", not "Greys" Code for reproduction print( f'{mpl.colormaps[ "Grays" ].name = }' ) # Greys Actual outcome mpl.col... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | denis-bz |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width