import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%load_ext autoreload
%load_ext watermark
%autoreload 2
%watermark -a "Bhishan Poudel" -d -v -m
%watermark -iv
Bhishan Poudel 2021-07-11 CPython 3.7.7 IPython 7.22.0 compiler : Clang 4.0.1 (tags/RELEASE_401/final) system : Darwin release : 19.6.0 machine : x86_64 processor : i386 CPU cores : 4 interpreter: 64bit pandas 1.2.4 seaborn 0.11.0 numpy 1.19.5
# my local library
import sys
sys.path.append("/Users/poudel/Dropbox/a00_Bhishan_Modules/")
sys.path.append("/Users/poudel/Dropbox/a00_Bhishan_Modules/bhishan")
from bhishan import bp
df = sns.load_dataset('titanic')
df.head()
survived | pclass | sex | age | sibsp | parch | fare | embarked | class | who | adult_male | deck | embark_town | alive | alone | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 3 | male | 22.0 | 1 | 0 | 7.2500 | S | Third | man | True | NaN | Southampton | no | False |
1 | 1 | 1 | female | 38.0 | 1 | 0 | 71.2833 | C | First | woman | False | C | Cherbourg | yes | False |
2 | 1 | 3 | female | 26.0 | 0 | 0 | 7.9250 | S | Third | woman | False | NaN | Southampton | yes | True |
3 | 1 | 1 | female | 35.0 | 1 | 0 | 53.1000 | S | First | woman | False | C | Southampton | yes | False |
4 | 0 | 3 | male | 35.0 | 0 | 0 | 8.0500 | S | Third | man | True | NaN | Southampton | no | True |
df.plot.scatter(x='age',y=['fare'])
<matplotlib.axes._subplots.AxesSubplot at 0x7f8e89a82290>
plt.style.use(bp.get_mpl_style(-1))
df.plot.scatter(x='age',y='fare')
<matplotlib.axes._subplots.AxesSubplot at 0x7f8e89b7fd50>
plt.style.use(bp.get_mpl_style(-2))
df.plot.scatter(x='age',y='fare')
<matplotlib.axes._subplots.AxesSubplot at 0x7f8e8c29d9d0>
plt.style.use(bp.get_mpl_style(-3))
df.plot.scatter(x='age',y='fare')
<matplotlib.axes._subplots.AxesSubplot at 0x7f8e8c327f90>
plt.style.use(bp.get_mpl_style(-100))
df.plot.scatter(x='age',y='fare')
<matplotlib.axes._subplots.AxesSubplot at 0x7f8e8c310310>
plt.style.use(bp.get_mpl_style(-200))
df.plot.scatter(x='age',y='fare')
<matplotlib.axes._subplots.AxesSubplot at 0x7f8e9220d7d0>
plt.style.use(bp.get_mpl_style(-300))
df.plot.scatter(x='age',y='fare')
<matplotlib.axes._subplots.AxesSubplot at 0x7f8e922da090>
plt.style.use(bp.get_mpl_style(0))
df.plot.scatter(x='age',y='fare')
<matplotlib.axes._subplots.AxesSubplot at 0x7f8e8c33a7d0>
plt.style.use(bp.get_mpl_style(1))
df.plot.scatter(x='age',y='fare')
<matplotlib.axes._subplots.AxesSubplot at 0x7f8e92494b90>
plt.style.use(bp.get_mpl_style(2))
df.plot.scatter(x='age',y='fare')
<matplotlib.axes._subplots.AxesSubplot at 0x7f8e9255eb90>
plt.style.use(bp.get_mpl_style(3))
df.plot.scatter(x='age',y='fare')
<matplotlib.axes._subplots.AxesSubplot at 0x7f8e92786950>
s = bp.get_mpl_style(4)
plt.style.use(s)
df.plot.scatter(x='age',y='fare')
<matplotlib.axes._subplots.AxesSubplot at 0x7f8e92820d50>