Title: [MNT]: Remove the label API from Artist · Issue #29422 · matplotlib/matplotlib · GitHub
Open Graph Title: [MNT]: Remove the label API from Artist · Issue #29422 · matplotlib/matplotlib
X Title: [MNT]: Remove the label API from Artist · Issue #29422 · matplotlib/matplotlib
Description: Summary Artist provides the label API intended to for legend labels: However, only a small subset of Artists are "data" Artists and can be reasonably used in a legend. From the subclasses of Artist: suitable for legend: Line2D, Collectio...
Open Graph Description: Summary Artist provides the label API intended to for legend labels: However, only a small subset of Artists are "data" Artists and can be reasonably used in a legend. From the subclasses of Artist...
X Description: Summary Artist provides the label API intended to for legend labels: However, only a small subset of Artists are "data" Artists and can be reasonably used in a legend. From the subclasses...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/29422
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[MNT]: Remove the label API from Artist","articleBody":"### Summary\r\n\r\nArtist provides the label API intended to for legend labels:\r\n\r\n\r\n\r\nHowever, only a small subset of Artists are \"data\" Artists and can be reasonably used in a legend. From the subclasses of Artist:\r\n\r\n- *suitable for legend:* Line2D, Collection, Patch\r\n- *not suitable for legend:* AnnotationBbox, Text, Tick, Axis, FigureBase, Legend, _AxesBase, Table, OffsetBox, _ImageBase, QuiverKey\r\n\r\nIn some of these not-suitable classes *label* is repurposed for other use cases, e.g. axis labels, figure labels being displayed as window title. That's quite confusing.\r\n\r\n### Proposed fix\r\n\r\nCreate a Protocol or Mixin or DataArtist subclass for legend labels and use that in Line2D, Collection, Patch. Deprecate and remove `get/set_label` from all other Artists; possibly taking special measures where *label* is currently repurposed.","author":{"url":"https://github.com/timhoffm","@type":"Person","name":"timhoffm"},"datePublished":"2025-01-07T09:03:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/29422/matplotlib/issues/29422"}
| 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:6d88b933-54b8-7cf5-745b-cc45abc56a5f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BEA8:1496F9:8281FC:B921CB:6A510658 |
| html-safe-nonce | af00e07a0d4d492b2596f62e2bd8bf00f8ff96d781d5a15d2958132d0070d996 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUE4OjE0OTZGOTo4MjgxRkM6QjkyMUNCOjZBNTEwNjU4IiwidmlzaXRvcl9pZCI6IjI1NjE0MzE3ODE3MjgzODg2OTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 87284e7535ded70bbb74a5551f29c5e4d1305dbaaa5b8122a74a419e0c680bc8 |
| hovercard-subject-tag | issue:2772280895 |
| 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/29422/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3d8b898a4bf52acbee173827804e6e73bf853d88ce5158f31921c1b91d06e40c/matplotlib/matplotlib/issues/29422 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3d8b898a4bf52acbee173827804e6e73bf853d88ce5158f31921c1b91d06e40c/matplotlib/matplotlib/issues/29422 |
| og:image:alt | Summary Artist provides the label API intended to for legend labels: However, only a small subset of Artists are "data" Artists and can be reasonably used in a legend. From the subclasses of Artist... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | timhoffm |
| hostname | github.com |
| expected-hostname | github.com |
| None | b076e100febaa00374cd89239f915d00dd3187f7c68b12bc2b7688181305344d |
| 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 | 2d129404fc45ea64edb1b98567c53e55b395536f |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width