Title: [MNT]: Collect style properties in a dedicated object · Issue #30828 · matplotlib/matplotlib · GitHub
Open Graph Title: [MNT]: Collect style properties in a dedicated object · Issue #30828 · matplotlib/matplotlib
X Title: [MNT]: Collect style properties in a dedicated object · Issue #30828 · matplotlib/matplotlib
Description: Summary Current situation Currently, style information is directly attached to the Artist classes, i.e. mixed with data, metadata (e.g. gid, label) and drawing information (e.g. animated, zorder). Proposal I prose to collect the style in...
Open Graph Description: Summary Current situation Currently, style information is directly attached to the Artist classes, i.e. mixed with data, metadata (e.g. gid, label) and drawing information (e.g. animated, zorder). ...
X Description: Summary Current situation Currently, style information is directly attached to the Artist classes, i.e. mixed with data, metadata (e.g. gid, label) and drawing information (e.g. animated, zorder). ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/30828
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[MNT]: Collect style properties in a dedicated object","articleBody":"### Summary\n\n#### Current situation\nCurrently, style information is directly attached to the Artist classes, i.e. mixed with data, metadata (e.g. gid, label) and drawing information (e.g. animated, zorder).\n\n#### Proposal\nI prose to collect the style information in a dedicated container, e.g. a dataclass, that will be a member of the Artist.\n\nFeedback welcome!\n\n#### Motivation\nSimilar how the data prototype collects and abstracts data handling, an ArtistStyle collects all visual aspects of the Artist. This creates internal semantic structures: While Artists currently contain a long ist of artist properties with various purposes, we may simplify them by grouping properties by concerns. I anticipate that this will make it easier to reason about them. Also this can enable new features like multiple artists sharing styles, or dynamic style updates.\n\n#### Additional information\n\nFor a start, this would be an internal change, without any modification to the public Artist API.\n\nAs an example, I could see the following Line2D properties grouped into a style:\n- alpha\n- antialiased\n- color or c\n- dash_capstyle\n- dash_joinstyle\n- dashes\n- drawstyle\n- fillstyle\n- gapcolor\n- linestyle\n- linewidth\n- marker\n- markeredgecolor\n- markeredgewidth\n- markerfacecolor\n- markerfacecoloralt\n- markersize\n- markevery\n- path_effects\n- rasterized\n- sketch_params\n- snap\n- solid_capstyle\n- solid_joinstyle\n\nThis would reduce the non-stype properties to:\n- animated\n- clip_box\n- clip_on\n- clip_path\n- data\n- figure\n- gid\n- in_layout\n- label\n- mouseover\n- picker\n- pickradius\n- transform\n- url\n- visible\n- xdata\n- ydata\n- zorder\n\n### Proposed fix\n\n_No response_","author":{"url":"https://github.com/timhoffm","@type":"Person","name":"timhoffm"},"datePublished":"2025-12-09T11:12:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/30828/matplotlib/issues/30828"}
| 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:3d2de6bf-b374-0dd3-d527-813500aefca6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A8BE:1299CA:6B95EF:9188DB:6A5150D1 |
| html-safe-nonce | 563cdec252db1b569c17abdb50f34749cfd2829066f6f23df5947f6aa91dd069 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOEJFOjEyOTlDQTo2Qjk1RUY6OTE4OERCOjZBNTE1MEQxIiwidmlzaXRvcl9pZCI6Ijc5MDY3MTA2NDM5NDc5NTAyODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4086a3f4de6a9aac3b989f79bd6a64a21886e2d1bcff3d835149b1ef99b2b4a7 |
| hovercard-subject-tag | issue:3710393733 |
| 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/30828/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b52c8f869873f272758a3b65d52091bad46695cf0d59b1157230efff68dd14bc/matplotlib/matplotlib/issues/30828 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b52c8f869873f272758a3b65d52091bad46695cf0d59b1157230efff68dd14bc/matplotlib/matplotlib/issues/30828 |
| og:image:alt | Summary Current situation Currently, style information is directly attached to the Artist classes, i.e. mixed with data, metadata (e.g. gid, label) and drawing information (e.g. animated, zorder). ... |
| 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 | 6f17634ed2af1d116850bcea6c63a70a4d72970f33ade1dd3eef3764b7e16994 |
| 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 | 511bff6ea06e144ed085ff736aea4c6404987b00 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width