October 2018
Beginner to intermediate
676 pages
18h 30m
English
We will plot four bar plots and three count plots using various different options:
plt.figure(figsize=(9,4))b = sns.barplot(x='Item', y='Sales', data=long_sales, estimator=sum, palette='husl')b.set(yscale='log', ylim=[50000, 1000000])sns.despine()for bar in b.patches: b.annotate("{:,}".format(bar.get_height()), (bar.get_x()+bar.get_width()/2.,bar.get_height()), ha='center',va='center',xytext= (0,10),textcoords='offset points', color='b', weight='bold')plt.title('Bar Plot: Long Data Format,value annotation & estimator=sum', size=15, color='g', weight='bold')
Read now
Unlock full access