python - 带有 Python 的靶心图
问题描述
我想bullseye chart
从pandas data frame
. dataframe
contains ,products
将按开发阶段和产品组进行分组。例如这样的:
import pandas as pd
df = pd.DataFrame({'Product': ['ABC','DEF','GHI','JKL','MNO','PQR','STV','WYX','ZZZ'],
'Phase': [1,2,3,1,2,3,1,2,3],
'Group': ['Group1','Group2','Group1','Group2','Group2','Group2','Group3','Group2','Group1']},
columns = ['Product', 'Phase', 'Group'])
df
Product Phase Group
0 ABC 1 Group1
1 DEF 2 Group2
2 GHI 3 Group1
3 JKL 1 Group2
4 MNO 2 Group2
5 PQR 3 Group2
6 STV 1 Group3
7 WYX 2 Group2
8 ZZZ 3 Group1
产品应在bullseye chart
. 第二列(开发阶段)将确定环。Phase 1: outer ring,
Phase 2: middle ring,
phase 3: center. Then the products should be grouped in the rings by their product group.
结果应该类似于下图。是否可以在 python 中使用或其他方式显示这样chart
的?automated manner
matplotlib
解决方案
推荐阅读
- php - 在一个人无法完全控制的主机上安装 ffmpeg?+
- javascript - 如何在 Angular 7 for 循环中找到数组的第一项和最后一项?
- javascript - 如何调用多个弹出窗口?
- python - conda 无法与鱼壳一起正常工作
- javascript - 如何按值获取密钥?
- reactjs - 如何使我的 React 应用程序安全?到目前为止,我可以使用 React DOM 工具登录,我错过了什么?
- javascript - 使用 lodash 格式化数据
- bootstrap-4 - Bootstrap BuildTools - 捆绑安装 - 找不到 Gemfile
- reactjs - 无法使用 SSR 路由呈现页面
- c# - 请解释信号量计数方案