/ Python And R Data science skills: 84 jointplot

Sunday 18 February 2018

84 jointplot

84 jointplot

jointplot

jointplot() allows you to basically match up two distplots for bivariate data. With your choice of what kind parameter to compare with:

  • “scatter”
  • “reg”
  • “resid”
  • “kde”
  • “hex”
In [10]:
import seaborn as sns
%matplotlib inline
tips = sns.load_dataset('tips')
tips.head(1)
Out[10]:
total_bill tip sex smoker day time size
0 16.99 1.01 Female No Sun Dinner 2
In [11]:
sns.jointplot(x='total_bill',y='tip',data=tips)
Out[11]:
<seaborn.axisgrid.JointGrid at 0x8576c18>
In [12]:
sns.jointplot(x='total_bill',y='tip',data=tips,kind='scatter')
Out[12]:
<seaborn.axisgrid.JointGrid at 0x86d1470>
In [13]:
sns.jointplot(x='total_bill',y='tip',data=tips,kind='hex')
Out[13]:
<seaborn.axisgrid.JointGrid at 0xd94ec50>
In [14]:
sns.jointplot(x='total_bill',y='tip',data=tips,kind='reg')
Out[14]:
<seaborn.axisgrid.JointGrid at 0xdae20f0>
In [15]:
sns.jointplot(x='total_bill',y='tip',data=tips,kind='kde')
Out[15]:
<seaborn.axisgrid.JointGrid at 0xdc2e978>
In [16]:
sns.jointplot(x='total_bill',y='tip',data=tips,kind='resid')
Out[16]:
<seaborn.axisgrid.JointGrid at 0xdcb8b00>
In [ ]:
sns.jointplot(x='total_bill',y='tip',data=tips)
In [17]:
tips.head(1)
Out[17]:
total_bill tip sex smoker day time size
0 16.99 1.01 Female No Sun Dinner 2
In [21]:
sns.jointplot(x='size',y='total_bill',data=tips,kind="reg")
Out[21]:
<seaborn.axisgrid.JointGrid at 0xf1b7b38>

No comments:

Post a Comment