当前位置:网站首页>Matplotlib common charts
Matplotlib common charts
2022-07-01 23:23:00 【Cold Lane (* _*)】
Broken line diagram
It can display contact data that changes over time , Therefore, it is very useful for displaying the trend of data at equal time intervals .
Applicable type
1. Basal body temperature curve
2. Student achievement trend chart
3. Stock charts
4. Monthly sales statistical analysis chart
5. Statistics of website visits
A little change , Better to see
Simple histogram
Also known as bar graph , Histogram , Bar chart . It's a statistical chart with the length of the rectangle as the variable .
Applicable type
Compare two or more data , It is suitable for small data set analysis
Grammar format
plt.bar(x,height,width,*,align='center',**kwargs)
x yes x Axis data
height Is the height of the column , It's also y Axis
align Is alignment
kwargs It's a keyword parameter , Other optional parameters , Such as color,alpha,label
Basic histogram
The usage is similar to what
Take a little test
Get ready Excel
Add this , The color lightens , It's much better
Multi histogram
Chou Chou
One
well , Two
Make a change
Basic histogram
Also known as mass distribution diagram , There are a series of longitudinal stripes or line segments with different heights to represent the data distribution .
grammar
plt.hist(x,bins)
x It's a dataset
bins Is the interval distribution of statistical data
Pie chart
It is often used to show the proportion of each part in the whole
grammar
plt.pie(x,labels,colors,labeldistance,autopct,startangle,radius,center,textprops)
x Is the proportion of each pie chart
labels Is the explanatory text displayed on the outside of each pie chart
labeldistance Is the drawing position of the mark , The ratio to the radius , The default value is 1.1
autopct Is to set the percentage of pie chart , You can use a formatted string or format function
startangle Is the starting drawing angle , The default is x The axis is drawn counterclockwise
radius Is the pie radius , The default value is 1
center Is a list of floating point types , Optional parameters , The default value is 0.0 Indicates the center of the chart
textprops Is to set the format of labels and proportions , Dictionary type
Make a change
边栏推荐
- rviz打开后如何显示实时2D地图
- Redis~02 缓存:更新数据时如何保证MySQL和Redis中的数据一致性?
- openresty 负载均衡
- 赵福全:短期解决保供,长期要打造安全、高效有韧性的供应链
- CKS CKA CKAD 将终端更改为远程桌面
- [applet] realize the left and right [sliding] list through the scroll view component
- Jerry's burning of upper version materials requires [chapter]
- Daily three questions 6.28
- MySQL -- convert rownum in Oracle to MySQL
- 物联网开发零基础教程
猜你喜欢
从第三次技术革命看企业应用三大开发趋势
Redis数据类型和应用场景
What is mosaic?
flutter Unable to load asset: assets/images/888.png
2022 R1 fast opening pressure vessel operation test questions and answers
Zhao Fuquan: to ensure supply in the short term, we should build a safe, efficient and resilient supply chain in the long term
物联网应用技术专业是属于什么类
问题随记 —— file /usr/share/mysql/charsets/README from install of MySQL-server-5.1.73-1.glibc23.x86_64 c
2022 examination questions and online simulation examination for safety management personnel of hazardous chemical business units
Redis~02 cache: how to ensure data consistency in MySQL and redis when updating data?
随机推荐
YOGA27多维一体电脑,兼具出色外观与高端配置
Copy ‘XXXX‘ to effectively final temp variable
[kotlin third party] coil koltin collaboration picture loading library coil glide like picture loading third party
众昂矿业:发展以氟化工为主的特色化工产业具有先天优势
flutter Unable to load asset: assets/images/888. png
[机缘参悟-35]:鬼谷子-飞箝篇-远程连接、远程控制与远程测试之术
What is mosaic?
Who do you want to know when opening a stock account? Is it safe to open an account online?
马赛克后挡板是什么?
Commemorate becoming the first dayus200 tripartite demo contributor
2022 examination questions and online simulation examination for safety management personnel of hazardous chemical business units
【微服务|Sentinel】SentinelResourceAspect详解
CKS CKA ckad change terminal to remote desktop
Matplotlib常用設置
dat. GUI
Timer和ScheduledThreadPoolExecutor的区别
物联网现状及未来发展趋势
Three development trends of enterprise application from the perspective of the third technological revolution
物联网开发零基础教程
玻璃马赛克