Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

seaborn bar plot

# importing the required library
import seaborn as sns
import matplotlib.pyplot as plt
 
# read a titanic.csv file
# from seaborn library
df = sns.load_dataset('titanic')
 
# class v / s fare barplot
sns.barplot(x = 'class', y = 'fare', data = df)
 
# Show the plot
plt.show()
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #seaborn #bar #plot
ADD COMMENT
Topic
Name
4+6 =