Mexal
0
Q:

python seaborn violin stack overflow

import matplotlib.pyplot as plt
import seaborn as sns

x = ["G","F","E","D","C","B"]
y = [3,14,45,47,34,15]

data = []
for i, yi in enumerate(y):
    data.extend([i]*yi)

sns.violinplot(y=data)
plt.yticks(range(len(x)), x)
plt.show()
0

New to Communities?

Join the community