Title: No error message in matplotlib.axes.Axes.legend() if there are more labels than handles · Issue #24050 · matplotlib/matplotlib · GitHub
Open Graph Title: No error message in matplotlib.axes.Axes.legend() if there are more labels than handles · Issue #24050 · matplotlib/matplotlib
X Title: No error message in matplotlib.axes.Axes.legend() if there are more labels than handles · Issue #24050 · matplotlib/matplotlib
Description: I had a bug in my code where I called plot() six times, stored the handles in a list, then called legend() with six handles, but seven labels for the legend. It would have been very helpful if matplotlib raised an exception in this case....
Open Graph Description: I had a bug in my code where I called plot() six times, stored the handles in a list, then called legend() with six handles, but seven labels for the legend. It would have been very helpful if matp...
X Description: I had a bug in my code where I called plot() six times, stored the handles in a list, then called legend() with six handles, but seven labels for the legend. It would have been very helpful if matp...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/24050
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"No error message in matplotlib.axes.Axes.legend() if there are more labels than handles","articleBody":"I had a bug in my code where I called `plot()` six times, stored the handles in a list, then called `legend()` with six handles, but seven labels for the legend.\r\n\r\nIt would have been very helpful if matplotlib raised an exception in this case.\r\n\r\n`matplotlib.__version__` is 3.6.0, Python 3.9.6.","author":{"url":"https://github.com/haferburg","@type":"Person","name":"haferburg"},"datePublished":"2022-09-29T09:34:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/24050/matplotlib/issues/24050"}
| 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:d37e1314-2e94-8873-0243-3224cbd0387e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D58:1D4F69:23A2ADB:305DA09:6A539A56 |
| html-safe-nonce | 1e0ec8522ffb25d373e6ad1fe094d4877bfe2bfa48da5229f3e415e974fcfe91 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDU4OjFENEY2OToyM0EyQURCOjMwNURBMDk6NkE1MzlBNTYiLCJ2aXNpdG9yX2lkIjoiMzU2OTM1NjQxMDE5MzE1NjY5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e1cbd2a14bd546ae0bdceed941bb011ad4344aa41f39f868bfcb2ea6d099fc44 |
| hovercard-subject-tag | issue:1390561874 |
| 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/24050/issue_layout |
| twitter:image | https://opengraph.githubassets.com/756ee650f4b9537f8ee91e049f76443f1c41986a6c5d879e8fd3364054b37778/matplotlib/matplotlib/issues/24050 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/756ee650f4b9537f8ee91e049f76443f1c41986a6c5d879e8fd3364054b37778/matplotlib/matplotlib/issues/24050 |
| og:image:alt | I had a bug in my code where I called plot() six times, stored the handles in a list, then called legend() with six handles, but seven labels for the legend. It would have been very helpful if matp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | haferburg |
| 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 | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width