4.2.1 Barplot

A barplot is one of the most common types of plot. It shows the relationship between a numerical variable and a categorical variable.

1. Simple Bar

x = np.array(list("ABCDEFGHIJ"))  # categorical variable 
y = np.arange(1, 11)
sns.barplot(x=x, y=y, palette="viridis")  
Simple Barplot

2. Vertical barplot

Vertical Barplot

3. Horizontal Barplot

Horizontal Barplot

4. Grouped Barplot

Stacked Barplot

5. Facet Barplot

Facet Barplot

Last updated

Was this helpful?