我需要更改轴中断geom_mosaic
。这是我的例子:
my_tibble <-
tibble(a=rep(c("a1","a2"),each=4),
b=rep(rep(c("b1","b2"),each=2),times=2),
c=rep(c("c1","c2"),times=4),
x=seq_along(b)
)
my_tibble |>
ggplot() +
geom_mosaic(aes(x=product(a,b,c),weight=x,fill=a),
divider=c("vspine","hspine","hspine"))
我只想要外部分组变量的标签,像这样
这可以通过简单的函数调用来实现geom_mosaic
吗?