用ChatGPT 4o画漂亮的燃尽图代码

把代码给ChatGPT,然后他就会帮我生成出来了。

而且图是动态的,可以调整颜色文字之类的内容

# Given data for Sprint 5 Progress
data_sprint_5 = {
    'User Story': [
        'BEAN-40', 'BEAN-42', 'BEAN-41', 'BEAN-22', 
        'BEAN-33', 'BEAN-44', 'BEAN-10', 'BEAN-26', 
        'BEAN-37', 'BEAN-36', 'BEAN-14', 'BEAN-39', 
        'BEAN-17', 'BEAN-38', 'BEAN-29', 'BEAN-9'
    ],
    'Task': [
        'Build Test Framework Base on Python',
        'Final Report',
        'Summary Reports',
        'As a staff member, I want to be able to send and receive messages so that I can communicate effectively with the customers and the managers',
        'As a manager, I want to be able to send and receive messages so that I can communicate effectively with the customers and the managers',
        'Design Test Cases',
        'As a customer, I want to provide feedback on menu items so that I can contribute to improving the menu and share my experiences with the business',
        'As a manager, I want to manage a points-based rewards system so that I can engage customers and drive sales',
        'Should display the estimated preparation time, When selecting the option for immediate pickup',
        'Add multiple quantities of the same item from the product page!',
        'As a customer, I want to be able to send and receive messages so that I can communicate effectively with the staff members',
        'Design Test Framework and Strategy',
        'As a customer, I want to view and manage my points-based rewards section so that I can manage my points',
        'Error info when click booking button',
        'As a manager, I want to view management reports to gain insights into customer behaviour and preferences so that I can take informed business decisions',
        'As a customer, I want to view my past orders so that I can easily reorder favourite items and track my purchase history'
    ],
    'Developer': [
        'Cedar', 'Cedar', 'Cedar', 'Luke, Arjun', 
        'Luke, Arjun', 'Luke, Arjun', 'Luke, Arjun', 
        'Luke, Arjun', 'Luke, Arjun', 'Luke, Arjun', 
        'Luke, Arjun', 'Luke, Arjun', 'Luke, Arjun', 
        'Luke, Arjun', 'Luke, Arjun', 'Luke, Arjun'
    ],
    'Estimated Hours': [
        10, 10, 10, 11, 
        9, 9, 12, 9, 
        12, 10, 5, 5, 
        5, 5, 5, 5
    ]
}

# Create a DataFrame from the given data
sprint_5_df = pd.DataFrame(data_sprint_5)

# Dates for the sprint
dates_sprint_5 = pd.date_range(start="2024-06-05", end="2024-06-10")

# Initialize remaining hours with total estimated hours at the start of the sprint
total_hours_sprint_5 = sprint_5_df['Estimated Hours'].sum()
remaining_hours_sprint_5 = total_hours_sprint_5
actual_burndown_sprint_5 = [remaining_hours_sprint_5]

# Update remaining hours only when a task is completed
for i, row in sprint_5_df.iterrows():
    # For this example, assume all tasks are completed
    remaining_hours_sprint_5 -= row['Estimated Hours']
    actual_burndown_sprint_5.append(remaining_hours_sprint_5)

# Extend the actual burndown to match the length of the dates if needed
while len(actual_burndown_sprint_5) < len(dates_sprint_5) + 1:
    actual_burndown_sprint_5.append(remaining_hours_sprint_5)

# Ideal burndown calculation
ideal_burndown_sprint_5 = [total_hours_sprint_5 - (total_hours_sprint_5 / len(dates_sprint_5)) * i for i in range(len(dates_sprint_5))]

# Ensure the lengths are the same for plotting
if len(actual_burndown_sprint_5) > len(dates_sprint_5) + 1:
    actual_burndown_sprint_5 = actual_burndown_sprint_5[:len(dates_sprint_5) + 1]

# Plotting the Burndown Chart
plt.figure(figsize=(10, 6))
plt.plot(dates_sprint_5, ideal_burndown_sprint_5, label='Ideal Burn Down', linestyle='--')
plt.plot(dates_sprint_5.insert(0, dates_sprint_5[0] - pd.Timedelta(days=1)), actual_burndown_sprint_5, label='Remaining Effort', marker='o')
plt.xlabel('Date')
plt.ylabel('Hours Remaining')
plt.title('Sprint 5 Burndown Chart')
plt.legend()
plt.grid(True)
plt.xticks(dates_sprint_5, rotation=45)
plt.yticks(range(0, total_hours_sprint_5 + 1, 5))
plt.tight_layout()

plt.show()

调整后的图

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/704785.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【学术小白成长之路】03三方演化博弈(基于复制动态方程)均衡点与稳定性分析

从本专栏开始&#xff0c;笔者正式研究演化博弈分析&#xff0c;其中涉及到双方演化博弈分析&#xff0c;三方演化博弈分析&#xff0c;复杂网络博弈分析等等。 先阅读了大量相关的博弈分析的文献&#xff0c;总结了现有的研究常用的研究流程&#xff0c;针对每个流程进行拆解。…

Sqlite3入门和c/c++下使用

1. SQLite3基本介绍 1.1 数据库的数据类型 1.2 基本语法 1. 创建数据表格 create table 表名(字段名 数据类型&#xff0c; 字段名 数据类型)&#xff1b; create table student(id int, name varchar(256), address text, QQ char(32)); 2. 插入数据 insert into 表名 valu…

手机流畅运行470亿参数大模型,上交大发布PowerInfer-2推理框架,性能提升29倍

苹果一出手&#xff0c;在手机等移动设备上部署大模型迅速成为行业焦点。 目前&#xff0c;移动设备上运行的模型相对较小&#xff08;苹果的是3B&#xff0c;谷歌的是2B&#xff09;&#xff0c;并且消耗大量内存&#xff0c;这在很大程度上限制了其应用场景。 即使是苹果&…

运营商二要素核验-手机号机主姓名核验接口-运营商二要素核验接口

通过电信运营商验证手机号码与姓名是否一致。广泛用于实名注册、风控审核等场景&#xff0c;如电商、游戏、直播、金融等需要用户实名认证的场景。支持携号转网核验。 更新周期&#xff1a;联通T1 电信T3 移动T3~5 均为工作日 接口地址&#xff1a; https://www.wapi.cn/api_de…

RabbitMQ系列-rabbitmq无法重新加入集群,启动失败的问题

当前存在3个节点&#xff1a;rabbitmq5672、rabbitmq5673、rabbitmq5674 当rabbitmq5673节点掉线之后&#xff0c;重启失败 重启的时候5672节点报错如下&#xff1a; 解决方案 在集群中取消失败节点 rabbitmqctl forget_cluster_node rabbitrabbitmq5673删除失败节点5673的…

木头姐预测:2029年特斯拉股价将达2600美元,市值8.2万亿美元

ARK预计特斯拉将在未来两年内推出robotaxi服务&#xff0c;并估计到2029年特斯拉近90%的市值和盈利将归功于robotaxi业务。此外研究表明&#xff0c;FSD模式下的特斯拉比人类驾驶的特斯拉安全约5倍&#xff0c;比道路上的普通汽车安全约16倍。 北京时间12日晚&#xff0c;木头姐…

【课程总结】Day9(上):深度学习基本流程

前言 在上一篇课程《【课程总结】Day7&#xff1a;深度学习概述》中&#xff0c;我们了解到&#xff1a; 模型训练过程→本质上是固定w和b参数的过程&#xff1b;让模型更好→本质上就是让模型的损失值loss变小&#xff1b;让loss变小→本质上就是求loss函数的最小值&#xf…

Java中ArrayList(顺序表)的自我实现(如果想知道Java中怎么自我实现ArrayList,那么只看这一篇就足够了!)

前言&#xff1a;在 Java 编程中&#xff0c;ArrayList 是一种非常常用的数据结构&#xff0c;它提供了动态数组的实现方式&#xff0c;可以方便地存储和操作数据。相比于传统的数组&#xff0c;ArrayList 具有更多的灵活性和便利性&#xff0c;可以根据需要动态地调整大小&…

构建 deno/fresh 的 docker 镜像

众所周知, 最近 docker 镜像的使用又出现了新的困难. 但是不怕, 窝们可以使用曲线救国的方法: 自己制作容器镜像 ! 下面以 deno/fresh 举栗, 部署一个简单的应用. 目录 1 创建 deno/fresh 项目2 构建 docker 镜像3 部署和测试4 总结与展望 1 创建 deno/fresh 项目 执行命令…

嵌套查询(一)-谓词IN、量词ANY、量词ALL

一、在多个表之间进行数据查询&#xff0c;除了可以使用连接查询之外&#xff0c;也可以使用嵌套查询&#xff0c;那么什么是嵌套查询呢&#xff1f;如何使用嵌套查询呢&#xff1f; 1、将一个SELECT-FROM查询&#xff0c;嵌套在另一个SELECT查询语句中&#xff0c;那么这个SE…

响应式企业网站建站系统源码 模版丰富+一站式建站 全开源可二次开发 带源码包+搭建部署教程

系统概述 在数字化转型的浪潮中&#xff0c;企业官网作为品牌展示、产品推广及客户服务的重要窗口&#xff0c;其建设质量直接影响着企业的线上形象与市场竞争力。响应式企业网站建站系统源码的出现&#xff0c;为企业提供了一种高效、灵活且成本可控的建站解决方案。 代码示…

【安装笔记-20240612-Linux-内网穿透服务之cpolar极点云】

安装笔记-系列文章目录 安装笔记-20240612-Linux-内网穿透服务之 cpolar 极点云 文章目录 安装笔记-系列文章目录安装笔记-20240612-Linux-内网穿透服务之 cpolar 极点云 前言一、软件介绍名称&#xff1a;cpolar极点云主页官方介绍 二、安装步骤测试版本&#xff1a;openwrt-…

日本旅游回忆录Day1-02三千院

中午回到京都站吃拉面啦&#xff0c;这边的图片由小宝补充&#xff0c;整体味道是不错的啦。时间关系&#xff0c;我不展开了&#xff0c;由小宝补充。 拉面&#xff1a; 下午目的地是三千院。 我们是坐公交车去的&#xff0c;刚刚上车就坐到了靠窗的位置&#xff0c;往深山里…

华为防火墙技术

防火墙技术综合介绍1 时代的认知&#xff1a;这是一个快鱼吃慢鱼的时代&#xff0c;是技术能够成就梦想是时代。 防火墙的认知&#xff1a;网络安全产品&#xff1b;位于网络的边界&#xff08;企事业单位的出口位置与ISP运营商进行连接并接入外网&#xff08;公网的&#xff…

MySQL(5)

聚合函数 GROUP BY 的使用 需求&#xff1a;查询各个部门的平均工资&#xff0c;最高工资SELECT department_id,AVG(salary),SUM(salary)FROM employeesGROUP BY department_id;需求&#xff1a;查询各个job_id的平均工资SELECT job_id,AVG(salary)FROM employeesGROUP BY jo…

rocketmq-5.1.2的dleger高可用集群部署

1、背景 原先为5.0.0版本&#xff0c;因检查出有漏洞&#xff0c;升级到5.1.2版本。 【Rocketmq是阿里巴巴在2012年开发的分布式消息中间件&#xff0c;专为万亿级超大规模的消息处理而设计&#xff0c;具有高吞吐量、低延迟、海量堆积、顺序收发等特点。在一定条件下&#xf…

牧原发布年度低碳报告,看行业“一哥”如何数字化减碳!

此前&#xff0c;牧原信息化负责人何秋梅在接受绿研院的专题访谈时提到&#xff1a;“在销售、采购等业务上&#xff0c;都涉及到大量的合同和文件&#xff0c;传统的纸质合同保存和管理繁琐&#xff0c;需要档案柜存储&#xff0c;且成本高昂。使用电子签不仅节省了打印、盖章…

优雅迷人的小程序 UI 风格

优雅迷人的小程序 UI 风格

什么是DMZ?路由器上如何使用DMZ?

文章目录 📖 介绍 📖🏡 演示环境 🏡📒 DMZ 📒🚀 DMZ的应用场景💡 路由器设置DMZ🎈 注意事项 🎈⚓️ 相关链接 ⚓️📖 介绍 📖 在网络管理中,DMZ(Demilitarized Zone,隔离区)是一个特殊的网络区域,常用于将公共访问和内部网络隔离开来。DMZ功能允许…

【Android面试八股文】1. 你说一说Handler机制吧 2. 你知道Handler的同步屏障吗? 3. Looper一直在循环,会造成阻塞吗?为什么?

文章目录 一. 你说一说Handler机制吧二、你知道Handler的同步屏障吗&#xff1f;2.1 Handler消息的分类2.2 什么是同步屏障2.3 为什么要设计同步屏障2.4 同步屏障的用法 三、Looper一直在循环&#xff0c;会造成阻塞吗&#xff1f;为什么&#xff1f;扩展阅读 一. 你说一说Hand…