小编Tim*_*Tim的帖子

如何使用R(ggplot2)爆炸圆环图切片

左边是我的圆环图当前的样子,右边是它的样子:

在此输入图像描述

有没有办法用R爆炸圆环图?

这是我的代码:

ggplot(dat, aes(fill = goalGroups, ymax = ymax, ymin = ymin, xmax = 4.8, xmin = 3)) +
  geom_rect(color = "white") +
  coord_polar(theta="y", direction = -1) +
  xlim(c(0, 8)) +
  theme_bw() +
  theme(panel.grid=element_blank()) +
  theme(axis.text=element_blank()) +
  theme(axis.ticks=element_blank()) +
  theme(axis.title.x = element_blank()) +
  theme(axis.title.y = element_blank()) +
  theme(panel.border = element_blank())
Run Code Online (Sandbox Code Playgroud)

我非常感谢任何帮助!

r ggplot2 exploded donut-chart

5
推荐指数
1
解决办法
844
查看次数

标签 统计

donut-chart ×1

exploded ×1

ggplot2 ×1

r ×1