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.
539 KiB
539 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 [6]:
sns.jointplot(x='math score',y='reading score',data=df)
Out[6]:
In [11]:
sns.jointplot(x='math score',y='reading score',data=df,kind='hex')
Out[11]:
In [12]:
sns.jointplot(x='math score',y='reading score',data=df,kind='kde')
Out[12]:
pairplot¶
In [13]:
sns.pairplot(df)
Out[13]:
In [17]:
sns.pairplot(df,hue='gender',palette='viridis')
Out[17]:
In [18]:
sns.pairplot(df,hue='gender',palette='viridis',corner=True)
Out[18]:
In [20]:
sns.pairplot(df,hue='gender',palette='viridis',diag_kind='hist')
Out[20]: