Title: [Bug]: violin's default alpha no longer persists · Issue #30613 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: violin's default alpha no longer persists · Issue #30613 · matplotlib/matplotlib
X Title: [Bug]: violin's default alpha no longer persists · Issue #30613 · matplotlib/matplotlib
Description: Bug summary Perhaps this is an understood and accepted behaviour change, but I did not see anything in the changenotes. If we set the facecolor of a violin object after creating it, we now also override the default alpha. Code for reprod...
Open Graph Description: Bug summary Perhaps this is an understood and accepted behaviour change, but I did not see anything in the changenotes. If we set the facecolor of a violin object after creating it, we now also ove...
X Description: Bug summary Perhaps this is an understood and accepted behaviour change, but I did not see anything in the changenotes. If we set the facecolor of a violin object after creating it, we now also ove...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/30613
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: violin's default alpha no longer persists","articleBody":"### Bug summary\n\nPerhaps this is an understood and accepted behaviour change, but I did not see anything in the changenotes. If we set the facecolor of a violin object after creating it, we now also override the default alpha.\n\n### Code for reproduction\n\n```Python\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nfig, ax = plt.subplots()\n\ndata = np.random.normal(size=(10, 3))\nviolins = ax.violinplot(data)\n\nfirst_violin = violins['bodies'][0]\nfirst_violin.set_facecolor('tab:red')\n\nplt.show()\n```\n\n### Actual outcome\n\nWith `main` I get\n\n\u003cimg width=\"640\" height=\"480\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/35342949-cd5a-4736-95a4-554a19580446\" /\u003e\n\n### Expected outcome\n\nWith 3.10 I get\n\n\u003cimg width=\"640\" height=\"480\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/afc0ce36-be1b-41f0-a194-13947fa88f25\" /\u003e\n\n### Additional information\n\nBisects to #27304. The default alpha is now included in the default facecolor as a `(color, alpha)` tuple, rather than being passed by the _alpha_ parameter.\n\n### Operating system\n\nUbuntu\n\n### Matplotlib Version\n\n`main`\n\n### Matplotlib Backend\n\nqtagg\n\n### Python version\n\n3.13.7\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\ngit checkout","author":{"url":"https://github.com/rcomer","@type":"Person","name":"rcomer"},"datePublished":"2025-09-28T10:42:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/30613/matplotlib/issues/30613"}
| 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:71bfb3a1-8514-1ff7-08b6-507d9d084d87 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D3D4:3321F9:34B00A:47BFB2:6A52CC64 |
| html-safe-nonce | f71e0177ed737b8fc029b4e96342e806cc4519435a524efa1d414d6d2c9ed285 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEM0Q0OjMzMjFGOTozNEIwMEE6NDdCRkIyOjZBNTJDQzY0IiwidmlzaXRvcl9pZCI6Ijc4MDAzMDA2NDMwNTEyOTM3OTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8e49cffb69d9de0f7c3929dea5299f2431ff9e7c2f67e4211a35be9351b36d21 |
| hovercard-subject-tag | issue:3461575768 |
| 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/30613/issue_layout |
| twitter:image | https://opengraph.githubassets.com/588b78c531e43de051f87237ac669296759640e6dfe3bac7dca1fb69ca0d8bc5/matplotlib/matplotlib/issues/30613 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/588b78c531e43de051f87237ac669296759640e6dfe3bac7dca1fb69ca0d8bc5/matplotlib/matplotlib/issues/30613 |
| og:image:alt | Bug summary Perhaps this is an understood and accepted behaviour change, but I did not see anything in the changenotes. If we set the facecolor of a violin object after creating it, we now also ove... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rcomer |
| 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 | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width