seaborn基础整理

seaborn是基于matplotlib的更高级的做图工具,下面主要针对以下几个部分进行整理:

第一部分:https://douzujun.github.io/page/%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98%E7%AC%94%E8%AE%B0/4-%E5%8F%AF%E8%A7%86%E5%8C%96%E5%BA%93Seaborn/Seaborn-1Style.html

1. Seaborn 整体布局风格设置

2. Seaborn 5种主题风格

3. Seaborn 风格细节设置

4. Seaborn 用with指定当前风格

5. Seaborn 设置整体画图域的大小 set_context("xxx")

第二部分:https://douzujun.github.io/page/%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98%E7%AC%94%E8%AE%B0/4-%E5%8F%AF%E8%A7%86%E5%8C%96%E5%BA%93Seaborn/Seaborn-2Color.html

1. Seaborn 调色板和分类色板

2. Seaborn 圆形画板

3. Seaborn 使用画板

4. Seaborn 调出来的颜色是成对存在的 color_palette("Paired", 8)

5. Seaborn light_palette() 和dark_palette()调用定制连续调色板

第三部分:https://douzujun.github.io/page/%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98%E7%AC%94%E8%AE%B0/4-%E5%8F%AF%E8%A7%86%E5%8C%96%E5%BA%93Seaborn/Seaborn-3Var.html

1. Seaborn 单变量分析绘图

2. Seaborn 直方图(单变量分析用直方图)

3. Seaborn 数据分布情况

4. Seaborn 根据均值和协方差生成数据

5. Seaborn 观测两个变量之间的分布关系最好用散点图

6. Seaborn hex图 (数据量大的时候)

7. Seaborn 多变量两两显示

第四部分:https://douzujun.github.io/page/%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98%E7%AC%94%E8%AE%B0/4-%E5%8F%AF%E8%A7%86%E5%8C%96%E5%BA%93Seaborn/4-REG.html

1. 回归分析绘图

2. regplot() 和 lmplot()都可以绘制回归关系, 推荐regplot()

3. x_jitter 使数据有一个小的抖动

4. regplot 和 lmplot的一些用法

第五部分:https://douzujun.github.io/page/%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98%E7%AC%94%E8%AE%B0/4-%E5%8F%AF%E8%A7%86%E5%8C%96%E5%BA%93Seaborn/5-category.html

1. 分类分析绘图

2. 条状图 蜂群图 小提琴图

3. 重叠现象(影响观测数据)的解决方法

4. 盒图(boxplot)

5. 显示值的集中趋势可以用条形图

6. 点图可以更好的描述变化差异

7. 多层面板分类图

第六部分:https://douzujun.github.io/page/%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98%E7%AC%94%E8%AE%B0/4-%E5%8F%AF%E8%A7%86%E5%8C%96%E5%BA%93Seaborn/6-FacetGrid.html

1. 想把 数据集 很多子集 进行展示的时候

2. 首先 把 展示区域 勾勒出来

3. 再通过 map 函数 把实际的图构造出来

第七部分:https://douzujun.github.io/page/%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98%E7%AC%94%E8%AE%B0/4-%E5%8F%AF%E8%A7%86%E5%8C%96%E5%BA%93Seaborn/7-Heatmap.html

1. 用来计算特征和特征之间的相关程度

2. 再将相关程度画成Heatmap

实验数据下载https://github.com/douzujun/douzujun.github.io/tree/master/page/%E6%95%B0%E6%8D%AE%E6%8C%96%E6%8E%98%E7%AC%94%E8%AE%B0/4-%E5%8F%AF%E8%A7%86%E5%8C%96%E5%BA%93Seaborn

原文地址:https://www.cnblogs.com/douzujun/p/8366283.html