我希望能够移除右侧的那些标签,就是那些在灰色框中的标签。我来举个例子:
p <- ggplot(mtcars, aes(mpg, wt, col=factor(cyl))) + geom_point()
p + facet_grid(cyl ~ .)
提前致谢!
Juan
p <- ggplot(mtcars, aes(mpg, wt, col=factor(cyl))) + geom_point()
p <- p + facet_grid(cyl ~ .)
p <- p +theme(strip.text.y = element_blank())
没有矩形
p <- ggplot(mtcars, aes(mpg, wt, col=factor(cyl))) + geom_point()
p <- p + facet_grid(cyl ~ .)
p <- p + theme(strip.background = element_blank(),
strip.text.y = element_blank())
ggplot(mtcars, aes(mpg, wt, col=factor(cyl))) + geom_point() + facet_grid(cyl ~ .) + theme(strip.text.y = element_blank(), strip.background = element_blank())
(这是一段R语言代码,用于生成散点图,并按车辆气缸数目将图形分面展示,同时自定义了一些图形元素的风格。) - Fredrik Karlsson