Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Box Plot in Seaborn

import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline

sns.boxplot(x="day", y="total_bill", data=tips,palette='rainbow') # box plot

sns.boxplot(x="day", y="total_bill", data=tips,palette='rainbow', orient='h') 
# box plot in horizontal mode

sns.boxplot(x="day", y="total_bill", hue="smoker",data=tips, palette="coolwarm") 
# box plot with simultabeous boxes for smoker categories

plt.show()
Source by seaborn.pydata.org #
 
PREVIOUS NEXT
Tagged: #Box #Plot #Seaborn
ADD COMMENT
Topic
Name
9+3 =