我如何自己创建这些彩色的条形图/框/方形圆框,这些圆框似乎在 R 或 python 甚至 exel 中都有自己的表?

How do I create these colored bars/boxes/square rounded boxes by themselves that seems to be in its own table in R or python or even exel?

提问人:comtuner 提问时间:10/21/2023 最后编辑:jay.sfcomtuner 更新时间:10/22/2023 访问量:45

问:

Player and EPA

如何自己创建这些彩色条形图/框/方形圆角框,这些圆框似乎在 R 或 python 甚至 excel 的表格中?我想从头开始创建这个确切的表格,现在可以使用固定的数字。

Player <- c('T.Lawrence', 'D.Carr')
Plays <- c(35,62)
EPA_play <- c(0.32, -0.28)
Total_EPA <- c(11.3, -17.2)

df <- data.frame(Player,Plays,EPA_play,Total_EPA)
df
kable(df)

这是输出,但也许在四分之一中会很好......?

|Player     | Plays| EPA_play| Total_EPA|
|:----------|-----:|--------:|---------:|
|T.Lawrence |    35|     0.32|      11.3|
|D.Carr     |    62|    -0.28|     -17.2|

我只想让显示看起来与上图相同,并在图表中显示条形图。如何让条形显示在表格中?

Python R 数据帧 格式 kable

评论

0赞 comtuner 10/21/2023
我不需要/想要表格/数据框中团队徽标的图像
0赞 RKeithL 10/21/2023
欢迎来到 Stack Overflow,@comtuner。这里的很多人都愿意提供帮助,但这里的标准做法是询问包含足以创建可重复示例的数据的 Q。你能提供你的数据吗?您尝试过什么代码?这可能就是你创建你所追求的桌子的全部内容。dput()kable()
0赞 comtuner 10/21/2023
dput(df) structure(list(Player = c(“T.Lawrence”, “D.Carr”), Plays = c(35, 62), EPA_play = c(0.32, -0.28), Total_EPA = c(11.3, -17.2)), class = “data.frame”, row.names = c(NA, -2L))
0赞 Derf 10/21/2023
@comtuner 请通过编辑将输出直接放在帖子上。这样就没有人需要去评论了dput()

答: 暂无答案