/ Python And R Data science skills: 93 colors

Sunday 18 February 2018

93 colors

93 colors
In [2]:
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
tips = sns.load_dataset('tips')
In [15]:
sns.countplot(x='sex',data=tips)
Out[15]:
<matplotlib.axes._subplots.AxesSubplot at 0xc3eae48>
In [16]:
sns.set_style('darkgrid')
sns.countplot(x='sex',data=tips)
#darkgrid, whitegrid, dark, white, ticks
Out[16]:
<matplotlib.axes._subplots.AxesSubplot at 0xc481860>
In [6]:
sns.set_style('dark')
sns.countplot(x='sex',data=tips)
#darkgrid, whitegrid, dark, white, ticks
Out[6]:
<matplotlib.axes._subplots.AxesSubplot at 0xb4975c0>
In [17]:
sns.set_style('ticks')
sns.countplot(x='sex',data=tips)
#darkgrid, whitegrid, dark, white, ticks
Out[17]:
<matplotlib.axes._subplots.AxesSubplot at 0xc4920b8>
In [8]:
sns.set_style('whitegrid')
sns.countplot(x='sex',data=tips)
#darkgrid, whitegrid, dark, white, ticks
Out[8]:
<matplotlib.axes._subplots.AxesSubplot at 0xb6f5748>
In [18]:
#sns.set_style('whitegrid')
sns.countplot(x='sex',data=tips)
sns.despine()
In [11]:
sns.set_style('white')
sns.countplot(x='sex',data=tips)
sns.despine()
In [19]:
sns.countplot(x='sex',data=tips)
sns.despine(left=True)
In [17]:
 # Non Grid Plot
plt.figure(figsize=(12,12))
sns.countplot(x='sex',data=tips)
Out[17]:
<matplotlib.axes._subplots.AxesSubplot at 0xbc41160>
In [20]:
sns.set_context('poster')
sns.countplot(x='sex',data=tips,palette='coolwarm')
Out[20]:
<matplotlib.axes._subplots.AxesSubplot at 0xd582e80>
In [22]:
sns.set_context('poster',font_scale=2)
sns.countplot(x='sex',data=tips,palette='coolwarm')
Out[22]:
<matplotlib.axes._subplots.AxesSubplot at 0xc44f5c0>
In [6]:
sns.set_context('poster',font_scale=3)
sns.countplot(x='sex',data=tips,palette='coolwarm')
Out[6]:
<matplotlib.axes._subplots.AxesSubplot at 0xb84e208>
In [26]:
#sns.set_context('notebook')
sns.countplot(x='sex',data=tips,palette='coolwarm')
Out[26]:
<matplotlib.axes._subplots.AxesSubplot at 0xd697208>
In [28]:
# Grid Type Plot
sns.lmplot(x='total_bill',y='tip',data=tips)
Out[28]:
<seaborn.axisgrid.FacetGrid at 0xd707748>
In [9]:
# Grid Type Plot
sns.lmplot(x='total_bill',y='tip',data=tips,hue="sex")
Out[9]:
<seaborn.axisgrid.FacetGrid at 0xb944550>
In [12]:
sns.lmplot(x='total_bill',y='tip',data=tips,hue="sex",palette="coolwarm")
Out[12]:
<seaborn.axisgrid.FacetGrid at 0xc2db8d0>
In [13]:
sns.lmplot(x='total_bill',y='tip',data=tips,hue="sex",palette="flag")
Out[13]:
<seaborn.axisgrid.FacetGrid at 0xc2ed828>
In [14]:
sns.lmplot(x='total_bill',y='tip',data=tips,hue="sex",palette="spring")
Out[14]:
<seaborn.axisgrid.FacetGrid at 0xc3644a8>

No comments:

Post a Comment