当前位置:网站首页>Openpyxl drawing radar map
Openpyxl drawing radar map
2022-07-27 12:25:00 【Struggling migrant workers】
effect

Code
from openpyxl import Workbook
from openpyxl.chart import (
RadarChart,
Reference,
)
wb = Workbook() # newly build wb object
ws = wb.active # Active cell table
rows = [
['Month', "Bulbs", "Seeds", "Flowers", "Trees & shrubs"],
['Jan', 0, 2500, 500, 0, ],
['Feb', 0, 5500, 750, 1500],
['Mar', 0, 9000, 1500, 2500],
['Apr', 0, 6500, 2000, 4000],
['May', 0, 3500, 5500, 3500],
['Jun', 0, 0, 7500, 1500],
['Jul', 0, 0, 8500, 800],
['Aug', 1500, 0, 7000, 550],
['Sep', 5000, 0, 3500, 2500],
['Oct', 8500, 0, 2500, 6000],
['Nov', 3500, 0, 500, 5500],
['Dec', 500, 0, 100, 3000],
]
# Data is written into the cell table
for row in rows:
ws.append(row)
chart = RadarChart()
chart.type = "filled"
labels = Reference(ws, min_col=1, min_row=2, max_row=13)
data = Reference(ws, min_col=2, max_col=5, min_row=1, max_row=13) # The data area of the plot
chart.add_data(data, titles_from_data=True)
chart.set_categories(labels)
chart.style = 26
chart.title = "Garden Centre Sales" # Chart title
chart.y_axis.delete = True
ws.add_chart(chart, "A17") # Add Icon to A17 The location of
wb.save("radar.xlsx") # preservation excle Table file
边栏推荐
- Shutter project scrollcontroller attached to multiple scroll views, failed assertion: line 109 POS 12 error handling
- Chapter 10 enumeration classes and annotations
- Go Introduction (2)
- While loop instance in shell
- Newticker uses
- The bank's face recognition system was broken: a depositor was stolen 430000 yuan
- @Postconstruct annotations and initializingbean perform some initialization operations after bean instantiation
- 2021-3-19-byte-face value
- 2021-3-23-meituan-regular sequence
- Go Beginner (4)
猜你喜欢
One article to understand the index of like in MySQL

虚拟偶像的歌声原来是这样生成的!

Chapter 7 exception handling

I do live e-commerce in tiktok, UK
![[product] about wechat product analysis](/img/b2/e1b32e86e2c991ae5c8f8a71f692fe.png)
[product] about wechat product analysis

最强分布式锁工具:Redisson
Unexpected harvest of epic distributed resources, from basic to advanced are full of dry goods, big guys are strong!

Unity 2D game tutorial

Solve the problem of @onetomany query falling into circular reference

Makefile template
随机推荐
Does the service layer need an interface
Fundamentals of mathematics 01
[excerpt] [medical image] common DICOM thumbnail interpretation and viewer converter conversion tool
Log4j2.xml configuration details
go 用本地代码replace
CMD Chinese garbled code solution
omitempty在go中的使用
Sword finger offer notes: t57 - ii Continuous positive sequence with sum s
系统临时文件的写和读:createTempFile和tempFileContent[通俗易懂]
2021-3-23-meituan-regular sequence
Iptables firewall
After Party A's hard work, 49.08 million orders of China Mobile were scrapped
微信小程序必用接口「建议收藏」
Guangdong: fire safety supervision is no longer "absent" in new industries and new formats such as script killing
POJ1988_Cube Stacking
[database data recovery] a data recovery case in which the disk partition where the SQL Server database is located is insufficient and an error is reported
Write and read system temporary files: createtempfile and tempfilecontent[easy to understand]
5V升压9V芯片
查看系统下各个进程打开的文件描述符数量
Packet transmission: application layer - kernel - hardware