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 reproduction
import matplotlib.pyplot as plt
import numpy as np
fig, ax = plt.subplots()
data = np.random.normal(size=(10, 3))
violins = ax.violinplot(data)
first_violin = violins['bodies'][0]
first_violin.set_facecolor('tab:red')
plt.show()
Actual outcome
With main I get
Expected outcome
With 3.10 I get
Additional information
Bisects 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.
Operating system
Ubuntu
Matplotlib Version
main
Matplotlib Backend
qtagg
Python version
3.13.7
Jupyter version
No response
Installation
git checkout
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 reproduction
Actual outcome
With
mainI getExpected outcome
With 3.10 I get
Additional information
Bisects 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.Operating system
Ubuntu
Matplotlib Version
mainMatplotlib Backend
qtagg
Python version
3.13.7
Jupyter version
No response
Installation
git checkout