Title: [Bug]: Markers with numeric name like CARETLEFT cannot be specified using a cycler · Issue #27596 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Markers with numeric name like CARETLEFT cannot be specified using a cycler · Issue #27596 · matplotlib/matplotlib
X Title: [Bug]: Markers with numeric name like CARETLEFT cannot be specified using a cycler · Issue #27596 · matplotlib/matplotlib
Description: Bug summary I want to cycle between multiple markerstyles, including those with a numeric value like CARETRIGHT as documented here, but I get an exception if I add one of those. Code for reproduction #!/usr/bin/env python3 from cycler im...
Open Graph Description: Bug summary I want to cycle between multiple markerstyles, including those with a numeric value like CARETRIGHT as documented here, but I get an exception if I add one of those. Code for reproducti...
X Description: Bug summary I want to cycle between multiple markerstyles, including those with a numeric value like CARETRIGHT as documented here, but I get an exception if I add one of those. Code for reproducti...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/27596
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Markers with numeric name like CARETLEFT cannot be specified using a cycler","articleBody":"### Bug summary\n\nI want to cycle between multiple markerstyles, including those with a numeric value like CARETRIGHT as documented [here](https://matplotlib.org/stable/api/markers_api.html#module-matplotlib.markers), but I get an exception if I add one of those.\n\n### Code for reproduction\n\n```python\n#!/usr/bin/env python3\r\n\r\nfrom cycler import cycler\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib.markers as mk\r\n\r\ncycle = cycler(marker=[\"+\",mk.CARETRIGHT])\r\n\r\nt=[0,1]\r\ny=[5,6]\r\n\r\nplt.rc('axes', prop_cycle=cycle)\r\nplt.plot(t,y)\r\nplt.show()\n```\n\n\n### Actual outcome\n\n```\r\nTraceback (most recent call last):\r\n File \"/home/mcd/bugs/bug-cycler.py\", line 11, in \u003cmodule\u003e\r\n plt.rc('axes', prop_cycle=cycle)\r\n File \"/usr/lib/python3.11/site-packages/matplotlib/pyplot.py\", line 670, in rc\r\n matplotlib.rc(group, **kwargs)\r\n File \"/usr/lib/python3.11/site-packages/matplotlib/__init__.py\", line 1062, in rc\r\n rcParams[key] = v\r\n ~~~~~~~~^^^^^\r\n File \"/usr/lib/python3.11/site-packages/matplotlib/__init__.py\", line 734, in __setitem__\r\n raise ValueError(f\"Key {key}: {ve}\") from None\r\nValueError: Key axes.prop_cycle: Could not convert 5 to str\r\n```\n\n### Expected outcome\n\nA plot using CARETLEFT as marker.\n\n### Additional information\n\nThis seems like it has to do with the fact, that some markers are referred to by number and not by a string like \"+\".\r\nI don't know whether the problem is in matplotlib, cycler or the combination of both.\n\n### Operating system\n\nArtix Linux\n\n### Matplotlib Version\n\n3.8.1\n\n### Matplotlib Backend\n\nGTK4Agg\n\n### Python version\n\nPython 3.11.6\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nLinux package manager","author":{"url":"https://github.com/castilma","@type":"Person","name":"castilma"},"datePublished":"2024-01-03T18:06:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/27596/matplotlib/issues/27596"}
| 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:f4d111d8-f640-1e74-ff88-6bdc4ae68e2c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B408:2373EB:4ED78C6:6F8F546:6A4FE01F |
| html-safe-nonce | 45ab3a2e64f13ad30d25a91dfba3a48011a776c9e03d21441508365d816f777a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDA4OjIzNzNFQjo0RUQ3OEM2OjZGOEY1NDY6NkE0RkUwMUYiLCJ2aXNpdG9yX2lkIjoiMTM3NDYyNzAyNjcyMDI1MTkzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d980bf05229a5c3580b9bad5e91b8e208705b6be77cb65f47a22fa92a0148bc1 |
| hovercard-subject-tag | issue:2064445359 |
| 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/27596/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3439fd5bc164ba7bdc490b2574cf2146a3327cc5087a4735891e214dc5fa91c0/matplotlib/matplotlib/issues/27596 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3439fd5bc164ba7bdc490b2574cf2146a3327cc5087a4735891e214dc5fa91c0/matplotlib/matplotlib/issues/27596 |
| og:image:alt | Bug summary I want to cycle between multiple markerstyles, including those with a numeric value like CARETRIGHT as documented here, but I get an exception if I add one of those. Code for reproducti... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | castilma |
| hostname | github.com |
| expected-hostname | github.com |
| None | 19b98c3d9767bb8a56238a89ff8401d1cbdf3bc5c353799aacf49fe6c76b4b7c |
| 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 | 142593e66413bbae27fd485859993597d5a3b104 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width