Title: [Bug]: Args for tripcolor · Issue #22303 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Args for tripcolor · Issue #22303 · matplotlib/matplotlib
X Title: [Bug]: Args for tripcolor · Issue #22303 · matplotlib/matplotlib
Description: Bug summary Thanks for matplotlib! tripcolor fails if colors are passed with named argument i.e c=values instead of just values. The error is not very informative and it seems a dangerous practice to ignore kwargs and only use args. File...
Open Graph Description: Bug summary Thanks for matplotlib! tripcolor fails if colors are passed with named argument i.e c=values instead of just values. The error is not very informative and it seems a dangerous practice ...
X Description: Bug summary Thanks for matplotlib! tripcolor fails if colors are passed with named argument i.e c=values instead of just values. The error is not very informative and it seems a dangerous practice ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/22303
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Args for tripcolor","articleBody":"### Bug summary\r\nThanks for matplotlib! \r\n`tripcolor` fails if colors are passed with named argument i.e `c=values` instead of just `values`. The error is not very informative and it seems a dangerous practice to ignore `kwargs` and only use `args`.\r\n\r\n```bash\r\n File \"/mnt/session_space/conda_envs/latest39/lib/python3.9/site-packages/matplotlib/tri/tripcolor.py\", line 57, in tripcolor\r\n C = np.asarray(args[0])\r\nIndexError: list index out of range\r\n```\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nplt.tripcolor(vertices[:,0], vertices[:,1], c=values, triangles=triangles)\r\n```\r\n\r\n### Actual outcome\r\n\r\n\r\n```bash\r\n File \"/mnt/session_space/conda_envs/latest39/lib/python3.9/site-packages/matplotlib/tri/tripcolor.py\", line 57, in tripcolor\r\n C = np.asarray(args[0])\r\nIndexError: list index out of range\r\n```\r\n\r\n### Expected outcome\r\n\r\na successful plot.\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.5.1\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/ThibaultGROUEIX","@type":"Person","name":"ThibaultGROUEIX"},"datePublished":"2022-01-24T13:37:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/22303/matplotlib/issues/22303"}
| 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:be46a50c-78b5-15a1-14d0-b03c6a036081 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3C2:2D16FA:496F8A4:675D9ED:6A56D8C4 |
| html-safe-nonce | ae719581b4307582268af8af160ab44b6c4cf326e94c91dbba28a6cae5381097 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0MyOjJEMTZGQTo0OTZGOEE0OjY3NUQ5RUQ6NkE1NkQ4QzQiLCJ2aXNpdG9yX2lkIjoiNTcyODU0NDY3NjE3NTQ0Mzg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1584fa5688610be1ff1944f19ce21fedd07803686b8cc3bbeeb0d6b3f8be41af |
| hovercard-subject-tag | issue:1112661261 |
| 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/22303/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9f39d7857055bf31ad046ff39134059b739068440c887144ee848d8971ca5b34/matplotlib/matplotlib/issues/22303 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9f39d7857055bf31ad046ff39134059b739068440c887144ee848d8971ca5b34/matplotlib/matplotlib/issues/22303 |
| og:image:alt | Bug summary Thanks for matplotlib! tripcolor fails if colors are passed with named argument i.e c=values instead of just values. The error is not very informative and it seems a dangerous practice ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ThibaultGROUEIX |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5220a278731283038daf0ed00b41f06ef7ff9539020ecc806c5c5a0fb6bda25a |
| 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 | 8684ae1a81cd3e4ef219b241179982bbda1a5b1f |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width