【发布时间】:2017-03-05 18:14:06
【问题描述】:
我一直在尝试使用 ggmosaic 制作马赛克/Marimekko 图,但希望删除 the thin line marking a hspine with the count of 0 (second column)。
这可以在 ggmosaic 中完成吗?我在小插图/帮助文件中找不到如何。下面是一个可重现的示例。
library(ggmosaic)
happy2 <- happy
happy2$marital <-
ifelse(happy2$marital == "never married" & happy2$happy == "not too happy",
NA, happy2$marital)
ggplot(happy2) +
geom_mosaic(aes(x = product(happy, marital), fill = happy))
【问题讨论】:
标签: r ggplot2 mosaic-plot