Title: `ax.set_prop_cycle` does not allow 'CN' colors · Issue #14221 · matplotlib/matplotlib · GitHub
Open Graph Title: `ax.set_prop_cycle` does not allow 'CN' colors · Issue #14221 · matplotlib/matplotlib
X Title: `ax.set_prop_cycle` does not allow 'CN' colors · Issue #14221 · matplotlib/matplotlib
Description: Hi matplotlib developers, I was surprised to discover that the cycler validation does not allow colors specified with 'CN' syntax. import numpy as np import matplotlib.pyplot as plt from cycler import cycler fig, ax = plt.subplots() ax.s...
Open Graph Description: Hi matplotlib developers, I was surprised to discover that the cycler validation does not allow colors specified with 'CN' syntax. import numpy as np import matplotlib.pyplot as plt from cycler imp...
X Description: Hi matplotlib developers, I was surprised to discover that the cycler validation does not allow colors specified with 'CN' syntax. import numpy as np import matplotlib.pyplot as plt from cy...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/14221
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`ax.set_prop_cycle` does not allow 'CN' colors","articleBody":"Hi matplotlib developers,\r\nI was surprised to discover that the cycler validation does not allow colors specified with `'CN'` syntax.\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom cycler import cycler\r\n\r\nfig, ax = plt.subplots()\r\nax.set_prop_cycle(cycler(color=['C1', 'C0'])) # raises ValueError\r\n# ax.set_prop_cycle(cycler(color=['tab:orange', 'tab:blue'])) # works fine\r\nax.plot(np.arange(9))\r\nax.plot(-np.arange(9))\r\nplt.show()\r\n```\r\nIf matplotlib can differentiate between `{'C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9'}` colors and `{'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'}` colors (case insensitive) anywhere else that a color is specified, then it seems to me that the cycler should be able to handle this as well. Thanks.\r\n\r\nTested with matplotlib 3.0.3 and python 3.7.3 (Anaconda) on Windows 10.\r\n","author":{"url":"https://github.com/u55","@type":"Person","name":"u55"},"datePublished":"2019-05-14T17:13:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":15},"url":"https://github.com/14221/matplotlib/issues/14221"}
| 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:cf283ec5-5641-9c82-98a3-56d4d120bf81 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A6C4:18B692:CE32AA:1142001:6A52A628 |
| html-safe-nonce | 8a8093e81643dd265c3bf855c63173df8cbb9f8aeb2a5c18ea7350b5d4d9e2f2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNkM0OjE4QjY5MjpDRTMyQUE6MTE0MjAwMTo2QTUyQTYyOCIsInZpc2l0b3JfaWQiOiI2MzUyMjAxNDEyMTczMjc2NzEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7e909a0539e33bee968356df1b78a24c33bf5eaf7872162b3dc628af0455263d |
| hovercard-subject-tag | issue:444030719 |
| 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/14221/issue_layout |
| twitter:image | https://opengraph.githubassets.com/721bba96758374569a6a9a3ef958464397bab5483c0804f4a125a35d12de3b18/matplotlib/matplotlib/issues/14221 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/721bba96758374569a6a9a3ef958464397bab5483c0804f4a125a35d12de3b18/matplotlib/matplotlib/issues/14221 |
| og:image:alt | Hi matplotlib developers, I was surprised to discover that the cycler validation does not allow colors specified with 'CN' syntax. import numpy as np import matplotlib.pyplot as plt from cycler imp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | u55 |
| 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