当前位置:网站首页>seaborn数据总体分布的可视化策略
seaborn数据总体分布的可视化策略
2022-06-21 12:51:00 【51CTO】
在查看一个数据的分布时,常用的可视化形式有直方图,密度分布图等,在seaborn中,相关的函数有以下几个
1. histplot. 通过直方图来展示数据分布
2. kdeplot, 通过密度分布图来展示数据分布
3. ecdfplot. 通过累积分布曲线来展示数据分布
4. rugplot. 通过x轴和y轴的边际分布来展示数据分布
下面通过一些基本的例子来感受下各自的可视化形式,histplot示例如下
输出结果如下

kedplot示例如下
输出结果如下

ecdfplot示例如下
输出结果如下

rugplot示例如下
输出结果如下

在实际使用中,histplot和kdeplot是使用的最高频的,其次是rugplot, 最后是ecdfplot。对于这一类函数而言,有许多的通用参数,以histplot为例,来看下这些参数的作用
1. x和y
数据分布通常是对数据框中的某一列进行查看,通过切换x和y参数,可以将图表倒置,示例如下
输出结果如下

2. color
color参数控制填充的颜色,示例如下
输出结果如下

3. hue
数据分布也是支持属性映射的,但是可以映射的属性就只有颜色属性了,所以只支持hue参数,示例如下
输出结果如下

4. pattle
pattle参数用于指定颜色梯度,示例如下
输出结果如下

除了通用参数外,每个函数还有自己专属的一些参数,这些参数很多,无法一一详细描述,可以通过官网的API文档详细查看。
这几个函数对应的高阶函数为displot, 基本用法如下
输出结果如下

通过kind参数来指定调用的子函数,通过col和row参数来实现分面的效果。
·end·

一个只分享干货的
生信公众号
边栏推荐
- Six possible challenges when practicing Devops
- Apache shardingsphere 5.1.2 release | new driving API + cloud native deployment to create a high-performance data gateway
- How to delete floating IP manually
- postgreSQL中的MVCC
- What does cloud desktop mean? What is the difference with fortress machine?
- TOOD: Task-aligned One-stage Object Detection
- curl常用参数详解及示例
- Educator web exercise - grouping form elements
- 机器学习探索共价键碳的亚稳态相图,未来可用于发现或设计亚稳态材料
- 计算距离的几种方式汇总
猜你喜欢
随机推荐
Application configuration management, basic principle analysis
Machine learning explores the metastable phase diagram of covalent carbon, which can be used to discover or design metastable materials in the future
Flink CDC MongoDB Connector 的实现原理和使用实践
Shell process control - 35. Multi branch case conditional statements
处理接口幂等性的两种常见方案
Huawei cloud releases desktop ide codearts
ICLR2022 | 训练面向分子模拟的十亿级参数 GNN
Isn't this another go bug?
【Appium踩坑】关闭inspector后打开weditor,uiautomator2.exceptions.NullPointerExceptionError: -32001 Jsonrpc er
uva11300
uva11991
Educoder Web练习题---页面结点元素
Apache shardingsphere 5.1.2 release | new driving API + cloud native deployment to create a high-performance data gateway
Apache ShardingSphere 5.1.2 发布|全新驱动 API + 云原生部署,打造高性能数据网关
Add a description to the form component
scrapy_redis分布式爬虫
Six possible challenges when practicing Devops
《预训练周刊》第50期:无解码变换器、神经提示搜索、梯度空间降维
【升级版学生信息管理系统】+文件操作+更多细节
AGCO AI frontier promotion (6.21)








