Seaborn Bar Plot – Tutorial and Examples
Introduction
Seaborn is one of the most widely used data visualization libraries in Python, as an extension to Matplotlib. It offers a simple, intuitive, yet highly customizable API for data visualization.
In this tutorial, we’ll take a look at how to plot a Bar Plot in Seaborn.
Bar graphs display numerical quantities on one axis and categorical variables on the other, letting you see how many occurrences there are for the different categories.
Bar charts can be used for visualizing a time series, as well as just categorical data.
Plot a Bar Plot in Seaborn
Plotting a Bar Plot in Matplotlib is as easy as calling the bar()
function on the PyPlot instance, and passing in the categorical and continuous variables that we’d like to visualize.
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style('darkgrid')
x = ['A', 'B', 'C']
y = [1,