Categorical Plots and Its Types
Hello Everyone!!
Let’s have a quick glance on the Categorical plots in python. This blog will explain you about What are Categorical plots and The various types of Categorical plots that are present in Python.
Let’s get started!!
What are Categorical Plots???
As we all know that Python provides various plotting techniques and various libraries , one such library is Seaborn.
Seaborn besides being a statistical plotting library also provides some default datasets. We will be using one such default dataset called ‘iris’.
Categorical Plots are the plots that consists of more than one category of data.
Types of Categorical Plots
The various forms of Categorical Plots are as follows:
- barplot
- countplot
- boxplot
- violinplot
- striplot
- swarmplot
- factorplot
Let’s have a look on each one of the them one by one:
Firstly, Import the necessary Libraries:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sb
Now, Load the dataset ‘iris’ from Seaborn:
1- Strip Plot:
2- Swarm Plot:
3- Bar Plot:
4-Count Plot:
5- Box Plot:
6- Violin Plot:
→ Combination of Violin Plot and Swarm Plot:
7- Factor Plot:
Hence these are some of the types of Categorical Plots. In this way we can enjoy and have fun with python and its interesting libraries and can plot various plots.
Thank You!!
Happy Learning!!😊