Seaborn is a library that helps in visualizing data. It comes with customized themes and a high level interface. In real-time situations, dataset contains many variables. Sometimes, it may be required to analyse the relationship of every variable with every other variable in the dataset. In such situations, bivariate distribution may take up too much time and may get complicated as well.
This is where multiple pairwise bivariate distribution comes into picture. The ‘pairplot’ function can be used to get the relationship between combinations of variables in a dataframe. The output would be a univariate plot.
Syntax of pairplot function
Now let us understand how it can be plotted on a graph −
import pandas as pd import seaborn as sb from matplotlib import pyplot as plt my_df = sb.load_dataset('iris') sb.set_style("ticks") sb.pairplot(my_df,hue = 'species',diag_kind = "kde",kind = "scatter",palette = "husl") plt.show()