Title: Violin Plot using Python, matplotlib and seaborn Date: 2017-10-21 16:00
In [1]:
# seaborn violin plot
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
In [2]:
%matplotlib inline
In [3]:
df = pd.read_csv('data.csv')
In [5]:
ax = sns.violinplot(data=df, palette="pastel")
plt.show()
In [6]:
fig = ax.get_figure()
fig.savefig('sns_violin_plot.png', dpi=300)
In [7]:
#seaborn violin plot
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
df = pd.read_csv('data.csv')
ax = sns.violinplot(data=df, palette="pastel")
fig = ax.get_figure()
fig.savefig('sns_violin_plot.png', dpi=300)
In [ ]: