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

Code
from openpyxl import Workbook
from openpyxl.chart import (
AreaChart,
Reference,
Series,
)
wb = Workbook()
ws = wb.active
rows = [
['Number', 'Batch 1', 'Batch 2'],
[2, 40, 30],
[3, 40, 25],
[4, 50, 30],
[5, 30, 10],
[6, 25, 5],
[7, 50, 10],
]
for row in rows:
ws.append(row)
chart = AreaChart()
chart.title = "Area Chart"
chart.style = 13
chart.x_axis.title = 'Test'
chart.y_axis.title = 'Percentage'
cats = Reference(ws, min_col=1, min_row=1, max_row=7)
data = Reference(ws, min_col=2, min_row=1, max_col=3, max_row=7)
chart.add_data(data, titles_from_data=True)
chart.set_categories(cats)
ws.add_chart(chart, "A10")
wb.save("area.xlsx")
边栏推荐
- 浪潮之巅——读书笔记+摘录+感悟
- POJ1988_Cube Stacking
- MySQL paging query instance_ MySQL paging query example explanation "suggestions collection"
- The strongest distributed locking tool: redisson
- 5V升压9V芯片
- Sword finger offer notes: t57 - ii Continuous positive sequence with sum s
- Makefile template
- JS string method summary
- 解决方案:Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
- Multi activity disaster recovery construction after station B 713 accident | takintalks share
猜你喜欢
![[product] about wechat product analysis](/img/b2/e1b32e86e2c991ae5c8f8a71f692fe.png)
[product] about wechat product analysis

A personal blog integrating technology, art and sports.

Chapter 13 IO flow

快抖抢救“失意人”

Solution: can not issue executeupdate() or executelargeupdate() for selections

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

Strictly control outdoor operation time! Foshan housing and Urban Rural Development Bureau issued a document: strengthening construction safety management during high temperature

解决方案:idea project没有显示树状图

图像分割 vs Adobephotoshop(PS)

解决方案:Can not issue executeUpdate() or executeLargeUpdate() for SELECTs
随机推荐
Plus版SBOM:流水线物料清单PBOM
Chapter 12 generics
孤独的年轻人,戒不了Jellycat
Docker Mysql的使用note
deeplab系列详解(简单实用年度总结)
NPM step pit
JS parasitic combinatorial inheritance
Binary search decision tree (average search length of binary search tree)
Advance in the flutter project_ image_ Picker component usage
[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
查看系统下各个进程打开的文件描述符数量
Leetcode 01: t1. sum of two numbers; T1108. IP address invalidation; T344. Reverse string
B 站 713 事故后的多活容灾建设|TakinTalks 大咖分享
Shell script text three swordsman awk
Write and read system temporary files: createtempfile and tempfilecontent[easy to understand]
Kazoo tutorial
Do you really understand the underlying data structure skip list of Zset in redis?
Go Beginner (4)
Wechat applet must use interface "suggestions collection"
上半年火灾起数下降27.7%,广东将这样提升全民消防安全素质