If I do something like:
import seaborn as sns
tips = sns.load_dataset("tips")
ax = sns.violinplot(x="day", y="total_bill", data=tips)
How can I change the colors by different hatches instead? I tried the same way we do this for boxplot, but didn't work.
IIUC:
import seaborn as sns
import matplotlib as mpl
tips = sns.load_dataset("tips")
hatch = ['/','\\','+','o']
ihatch = iter(hatch)
ax = sns.violinplot(x="day", y="total_bill", data=tips, color='g')
_ = [i.set_hatch(next(ihatch)) for i in ax.get_children() if isinstance(i, mpl.collections.PolyCollection)]
Output: