我使用ggplot2包和facet_wrap函数创建了一个类似于这里的图形。我想抑制一些x轴文本,以使它更清晰易读。
例如,在此处仅在D、F、H和J框中出现x轴刻度将更易读。
我该如何做?谢谢!
编辑:可重复代码
library(ggplot2)
d <- ggplot(diamonds, aes(carat, price, fill = ..density..)) +
xlim(0, 2) + stat_binhex(na.rm = TRUE) + theme(aspect.ratio = 1)
d + facet_wrap(~ color, nrow = 1)