Seaborn Categorial Plots - Introduction



Plots are mostly used to depict the relationship between two or more variables. Those variables can be entirely numerical or represent a category such as a group, class, or division. This article discusses categorical variables and how they may be visualized with Python's Seaborn package.

Seaborn contains various default datasets in addition to being a statistical charting toolkit. We'll use the one of the in-built datasets as an example of a default dataset.

Let us consider the tips dataset in the first example. The 'tips' dataset comprises information about people who have likely eaten at a restaurant and whether or not they left a tip for the servers, as well as their gender, smoking status, and other factors.

Seaborn.get_dataset_names() method helps to retrieve all the names of the in-built datasets.

seaborn.get_dataset_names()

The load_dataset() method helps to load the dataset with the name into a data structure.

Tips=seaborn.load_dataset('tips')

The above line of code helps to load the dataset with the name 'tips' into a data structure called tips.

There are different kinds of categorical plots such as distribution, estimate and scatter plots. Each of these are categories contain a few plots each.

S.No Type Plot Names
1 Categorical Scatter Plots
2 Categorical Distribution Plots
3 Categorical Estimate Plots
seaborn_function_reference.htm
Advertisements