Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #seaborn #violin #stack #overflow
ADD COMMENT
Topic
Name
8+6 =