Answers for "python seaborn violin stack overflow"

0

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()
Posted by: Guest on May-06-2020

Python Answers by Framework

Browse Popular Code Answers by Language