In pandas we may have multiple columns of data, along with row and column labels. pandas itself has built-in methods that simplify creating visualizations from Data‐ Frame and Series objects. Another library is seaborn, a statistical graphics library cre‐ ated by Michael Waskom. Seaborn simplifies creating many common visualization types.
sns.barplot
在探究变量之间关系的时候我们经常需要查看变量之间的散点图,Seaborn提供了一个pairplot函数来方便的进行这个操作,该函数会返回所有变量之间散点图以及单个变量的概率密度估计或者直方图。
有些情况下我的数据有额外的分组维度,这个时候就需要我们有一个函数能针对该维度的不同取值分别绘制不同的图片,这个时候就用到了sns的factorplot函数:
sns.factorplot(x=,y=,hue=,col=,row=,kind=,data=)
其中col和row表示子图分类的依据,hue参数表示每一幅图内绘图分开的标签(图例形成依据)。 kind表示子图类型
sns.factorplot(x='day', y='tip_pct', row='time',
col='smoker',
kind='bar', data=tips[tips.tip_pct < 1])