Skip to content

Latest commit

 

History

History
35 lines (30 loc) · 1.45 KB

File metadata and controls

35 lines (30 loc) · 1.45 KB

What is Barplot ?

A barplot shows the relationship between a numeric and a categoric variable. Each entity of the categoric variable is represented as a bar. The size of the bar represents its numeric value.

plt.bar(data.Area.unique(), data.Area.value_counts(), width=.3, color=['black', 'red', 'green', 'blue', 'cyan'])

plt.barh(data.Area.unique(), data.Area.value_counts(), color=(0.2, 0.6, 0.6, 0.6))

  • plt.xlabel('category', fontweight='bold', color = 'green', fontsize='18')
  • plt.ylabel('values', color = 'red', fontsize='18')
  • plt.xticks(color='orange')
  • plt.yticks(color='orange')

Label socre

plt.bar(data.Area.unique(), data.Area.value_counts(), color=['green'], edgecolor='red')

fig.text(.6, -0.15, '© Pritom Saha', fontsize = 12,color ='red', ha ='right', va ='bottom',alpha = 0.7)

Ref : The Python Graph Gallery Barplot