You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
672 KiB
672 KiB
<html>
<head>
</head>
</html>
Comparison Plots with pairplot() and jointplot()¶
Imports¶
In [1]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
The Data¶
In [2]:
df = pd.read_csv("StudentsPerformance.csv")
In [3]:
df.head()
Out[3]:
jointplot¶
In [4]:
sns.jointplot(x='math score',y='reading score',data=df)
Out[4]:
In [5]:
sns.jointplot(x='math score',y='reading score',data=df,kind='hex')
Out[5]:
In [6]:
sns.jointplot(x='math score',y='reading score',data=df,kind='kde')
Out[6]:
pairplot¶
In [7]:
sns.pairplot(df)
Out[7]:
In [8]:
sns.pairplot(df,hue='gender',palette='viridis')
Out[8]:
In [9]:
sns.pairplot(df,hue='gender',palette='viridis',corner=True)
Out[9]:
In [10]:
sns.pairplot(df,hue='gender',palette='viridis',diag_kind='hist')
Out[10]: