当前位置:网站首页>Matplotlib draws a histogram and adds values to the graph
Matplotlib draws a histogram and adds values to the graph
2022-07-06 23:43:00 【L-M-Y】
matplotlib For details of drawing, please refer to the above :
https://blog.csdn.net/qq_52109814/article/details/121901438?spm=1001.2014.3001.5501
from matplotlib import pyplot as plt
import numpy as np
# Edit legend
def autolabel(rects):
for rect in rects:
height = rect.get_height()
# Set legend font 、 Location 、 Values, etc
plt.text(rect.get_x(), 1.01*height, '%s' %
float(height), size=11, family="Times new roman")
y = ['A', 'B', 'C', 'D', 'E', 'F']
x = [6.624, 7.394, 14.972, 17.545, 21.239, 16.736]
rect = plt.bar(y, x, width=0.5)
autolabel(rect)
plt.title("Overall Value S")
plt.xlabel("Area")
plt.ylabel("Variance")
plt.legend()
plt.show()
Run the example :
边栏推荐
- Wasserstein slim gain with gradient poverty (wsgain-gp) introduction and code implementation -- missing data filling based on generated countermeasure network
- MySQL connected vscode successfully, but this error is reported
- Gradle知识概括
- 每日刷题记录 (十五)
- 快讯 l Huobi Ventures与Genesis公链深入接洽中
- Let me ask you if there are any documents or cases of flynk SQL generation jobs. I know that flynk cli can create tables and specify items
- Eureka Client启动后就关闭 Unregistering application xxx with eureka with status DOWN
- A few suggestions for making rust library more beautiful! Have you learned?
- Why is bat still addicted to 996 when the four-day working system is being tried out in Britain?
- MATLIB从excel表中读取数据并画出函数图像
猜你喜欢
内网穿透zerotier 外网(手机、电脑等)访问内网设备(树莓派、NAS、电脑等)
B站大佬用我的世界搞出卷積神經網絡,LeCun轉發!爆肝6個月,播放破百萬
Server SMP, NUMA, MPP system learning notes.
Nftscan Developer Platform launches Pro API commercial services
GPT-3当一作自己研究自己,已投稿,在线蹲一个同行评议
Koa2 addition, deletion, modification and query of JSON array
资产安全问题或制约加密行业发展 风控+合规成为平台破局关键
Basic chart interpretation of "Oriental selection" hot out of circle data
Station B boss used my world to create convolutional neural network, Lecun forwarding! Burst the liver for 6 months, playing more than one million
吴恩达2022机器学习课程评测来了!
随机推荐
借助这个宝藏神器,我成为全栈了
(LeetCode)两数之和
MySQL implementation of field segmentation from one line to multiple lines of example code
mysql-cdc 的jar包 ,在flink运行模式下,是不是要放在不同的地方呢?
公链与私链在数据隐私和吞吐量上的竞争
PDF批量拆分、合并、书签提取、书签写入小工具
[system analyst's road] Chapter 7 double disk system design (service-oriented development method)
Without CD, I'll teach you a trick to restore the factory settings of win10 system
云原生(三十二) | Kubernetes篇之平台存储系统介绍
Win11怎么恢复传统右键菜单?Win11右键改回传统模式的方法
英国都在试行4天工作制了,为什么BAT还对996上瘾?
How to find out if the U disk file of the computer reinstallation system is hidden
浅谈现在的弊端与未来的发展
Should the jar package of MySQL CDC be placed in different places in the Flink running mode?
Yaduo Sangu IPO
With the help of this treasure artifact, I became the whole stack
js对JSON数组的增删改查
JS addition, deletion, modification and query of JSON array
koa2对Json数组增删改查
Station B boss used my world to create convolutional neural network, Lecun forwarding! Burst the liver for 6 months, playing more than one million