当前位置:网站首页>Matplotlib常用图表
Matplotlib常用图表
2022-07-01 22:50:00 【冷巷(*_*)】
折线图
可以显示随时间变化而变化的联系数据,因此非常使用于显示在相等时间间隔下数据的趋势。
适用类型
1.基础体温曲线图
2.学生成绩走势图
3.股票走势图
4.月销售统计分析图
5.网站访问量统计图
小小改动一下,更好看了
简单柱状图
又称长条图,柱状图,条状图。是一种以长方形的长度为变量的统计图表。
适用类型
比较两个或以上的数据,适用于较小的数据集分析
语法格式
plt.bar(x,height,width,*,align='center',**kwargs)
x是x轴数据
height是柱子高度,也是y轴
align是对齐方式
kwargs是关键字参数,其他可选参数,如color,alpha,label
基本柱状图
用法和什么的差不多
小测一下
准备一下Excel
加下这个,颜色变浅,好看多了
多柱状图
瞅瞅
一条
好的,俩条了
改一改
基本直方图
又称质量分布图,有一系列高度不等的纵向条纹或者线段表示数据分布的情况。
语法
plt.hist(x,bins)
x是数据集
bins是统计数据的区间分布
饼形图
常用来显示各个部分在整体所占的比例
语法
plt.pie(x,labels,colors,labeldistance,autopct,startangle,radius,center,textprops)
x是每一块饼形图的比例
labels是每一块饼形图外侧显示的说明文字
labeldistance是标记的绘制位置,相对于半径的比例,默认值为1.1
autopct是设置饼形图的百分比,可以使用格式化字符串或format函数
startangle是起始绘制角度,默认是x轴正方向逆时针画起
radius是饼图半径,默认值为1
center是浮点类型的列表,可选参数,默认值为0.0表示图表中心位置
textprops是设置标签和比例文职的格式,字典类型
改一改
边栏推荐
- SWT/ANR问题--SWT 导致 low memory killer(LMK)
- js——arguments的使用
- Armbain系统根分区空间不足处理
- What is the mosaic tailgate?
- flutter Unable to load asset: assets/images/888.png
- 【微服务|Sentinel】sentinel整合openfeign
- Explain JMM in detail
- [kotlin third party] coil koltin collaboration picture loading library coil glide like picture loading third party
- Use of locust
- 赵福全:短期解决保供,长期要打造安全、高效有韧性的供应链
猜你喜欢
Explain JMM in detail
Glass mosaic
Some abilities can't be learned from work. Look at this article, more than 90% of peers
Use 3DMAX to make a chess piece
Redis~02 cache: how to ensure data consistency in MySQL and redis when updating data?
Istio, ebpf and rsocket Broker: in depth study of service grid
【嵌入式系统课设】单个按键控制LED灯
思科--WAN 的概念考试外部工具
Groups and ranges of regular series
工作中非常重要的测试策略,你大概没注意过吧
随机推荐
"35 years old, the boss of the company, with a monthly salary of 20000, give away takeout": the times abandoned you, not even saying goodbye
Genicam gentl standard ver1.5 (4) Chapter 5 acquisition engine
Multiple smart pointers
shell 流程控制
What is the relationship between modeling and later film and television?
Use 3DMAX to make a chess piece
Cisco -- an external tool for WAN's concept examination
shell 自定义函数
Programming English vocabulary notebook
内存泄露和内存溢出的区别是什么?
会声会影2022智能、快速、简单的视频剪辑软件
思科考试--冗余网络
想请教一下,证券开户选择哪个证券比较好?手机开户是安全么?
思科考试--路由的概念和配置考试
半监督学习之数据增强
SWT/ANR问题--SWT 导致 kernel fuse deadlock
思科--高可用和高可靠网络考试
Design of ESP automatic download circuit
[micro service sentinel] sentinelresourceaspect details
Treatment of insufficient space in the root partition of armbain system