import matplotlib.pylab as plt
import seaborn as sns

df = sns.load_dataset('iris')
my_dpi=96
plt.figure(figsize=(480/my_dpi, 480/my_dpi), dpi=my_dpi)

sns.pairplot(df)
plt.show()

import matplotlib.pylab as plt
import seaborn as sns

df = sns.load_dataset('iris')
my_dpi=96
plt.figure(figsize=(480/my_dpi, 480/my_dpi), dpi=my_dpi)

sns.pairplot(df, kind="reg")
plt.show()

 

import matplotlib.pylab as plt
import seaborn as sns

df = sns.load_dataset('iris')
my_dpi=96
plt.figure(figsize=(480/my_dpi, 480/my_dpi), dpi=my_dpi)

sns.pairplot(df, kind="scatter")
plt.show()

 

import matplotlib.pylab as plt
import seaborn as sns

df = sns.load_dataset('iris')
my_dpi=96
plt.figure(figsize=(480/my_dpi, 480/my_dpi), dpi=my_dpi)

sns.pairplot(df, kind="scatter", hue="species", markers=["o", "s", "D"], palette="Set2")
plt.show()

 

import matplotlib.pylab as plt
import seaborn as sns

df = sns.load_dataset('iris')
my_dpi=96
plt.figure(figsize=(480/my_dpi, 480/my_dpi), dpi=my_dpi)

sns.pairplot(df, kind="scatter", hue="species", plot_kws=dict(s=80, edgecolor="white", linewidth=2.5))
plt.show()

 

import matplotlib.pylab as plt
import seaborn as sns

df = sns.load_dataset('iris')
my_dpi=96
plt.figure(figsize=(480/my_dpi, 480/my_dpi), dpi=my_dpi)

sns.pairplot(df, diag_kind="kde")
plt.show()

 

import matplotlib.pylab as plt
import seaborn as sns

df = sns.load_dataset('iris')
my_dpi=96
plt.figure(figsize=(480/my_dpi, 480/my_dpi), dpi=my_dpi)

sns.pairplot(df, diag_kind="hist")
plt.show()

 

import matplotlib.pylab as plt
import seaborn as sns

df = sns.load_dataset('iris')
my_dpi=96
plt.figure(figsize=(480/my_dpi, 480/my_dpi), dpi=my_dpi)

sns.pairplot(df, diag_kind="kde", diag_kws=dict(shade=True, bw=.05, vertical=False) )
plt.show()

 

 本博主新开公众号, 希望大家能扫码关注一下,十分感谢大家。

本文来自:https://github.com/holtzy/The-Python-Graph-Gallery/blob/master/PGG_notebook.py  

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐