From female/male counts in a csv
file like below,
female,length
1,4
1,3
1,9
1,2
1,7
1,8
1,9
I generated the violin plot by using Python Seaborn. However, it has a sawtooth look. I do not have any prior experience in generating violin plots; however, there are examples on the web generating violin plots with the y-axis having integer samples. Can you identify the reason?
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
plt.rcParams['figure.figsize'] = (20.0, 10.0)
plt.rcParams['font.family'] = "serif"
df = pd.read_csv('scores.csv')
df = df.loc[df.length < 15]
p = sns.violinplot(data=df,
x = 'female',
y = 'length')