seaborn 图表全集:27 种图型 × 5 例
seaborn 图表全集:27 种图型 × 5 例
生成日期 2026-11-07 Python 3.13.3 + seaborn 0.13.2 + matplotlib 3.10.9
版式遵循本机
matplotlib-plot-cn规范:中文宋体、西文 Times New Roman、刻度朝内四边、图内无标题、留白自检 ≥ 8 px。
本集把 seaborn 0.13.2 的全部 27 个绘图函数各做 5 个电气场景,覆盖关系、分布、类别、回归、矩阵、组合网格六大类。
一个必须知道的坑
不要调用 sns.set_theme()。它会把 font.family 改成 Arial 一类,中文立刻变方框,与本地的「宋体 + Times」规范直接冲突。本集只调 seaborn 的绘图函数,版式全部交给 plot_cn,因此 135 张图中文均正常。
目录
seaborn图表全集_261107/
├── code/ 公共配置 + 5 个批次脚本 + 生成文档脚本
├── docs/ 27 份分册 + 本索引
└── figures/ 27 个图型目录,共 135 张 PNG
27 种图型索引
| 编号 | 图型 | 文档 | 图片目录 |
|---|---|---|---|
| 01 | 散点图 scatterplot | 打开 | figures/01_散点图/ |
| 02 | 折线图 lineplot | 打开 | figures/02_折线图/ |
| 03 | 关系分面图 relplot | 打开 | figures/03_关系分面图/ |
| 04 | 直方图 histplot | 打开 | figures/04_直方图/ |
| 05 | 核密度图 kdeplot | 打开 | figures/05_核密度图/ |
| 06 | 累积分布 ecdfplot | 打开 | figures/06_累积分布/ |
| 07 | 地毯图 rugplot | 打开 | figures/07_地毯图/ |
| 08 | 分布分面图 displot | 打开 | figures/08_分布分面图/ |
| 09 | 条带图 stripplot | 打开 | figures/09_条带图/ |
| 10 | 蜂群图 swarmplot | 打开 | figures/10_蜂群图/ |
| 11 | 箱线图 boxplot | 打开 | figures/11_箱线图/ |
| 12 | 小提琴图 violinplot | 打开 | figures/12_小提琴图/ |
| 13 | 增强箱线图 boxenplot | 打开 | figures/13_增强箱线图/ |
| 14 | 点线图 pointplot | 打开 | figures/14_点线图/ |
| 15 | 柱状图 barplot | 打开 | figures/15_柱状图/ |
| 16 | 频次柱状 countplot | 打开 | figures/16_频次柱状/ |
| 17 | 类别分面图 catplot | 打开 | figures/17_类别分面图/ |
| 18 | 回归图 regplot | 打开 | figures/18_回归图/ |
| 19 | 回归分面图 lmplot | 打开 | figures/19_回归分面图/ |
| 20 | 残差图 residplot | 打开 | figures/20_残差图/ |
| 21 | 热图 heatmap | 打开 | figures/21_热图/ |
| 22 | 聚类热图 clustermap | 打开 | figures/22_聚类热图/ |
| 23 | 成对矩阵 pairplot | 打开 | figures/23_成对矩阵/ |
| 24 | 联合分布 jointplot | 打开 | figures/24_联合分布/ |
| 25 | 分面网格 FacetGrid | 打开 | figures/25_分面网格/ |
| 26 | 成对网格 PairGrid | 打开 | figures/26_成对网格/ |
| 27 | 联合网格 JointGrid | 打开 | figures/27_联合网格/ |
运行
cd seaborn图表全集_261107/code
python 生成文档261107.py # 全量重出 135 张 + 重建 27 份文档
python 第三批_类别图261107.py # 只重出类别图那一批

浙公网安备 33010602011771号