摆脱那些灰色盒子上的 facet_grid 标签? [英] Getting rid of facet_grid labels on those gray boxes?

查看:22
本文介绍了摆脱那些灰色盒子上的 facet_grid 标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望删除右侧的那些标签,即侧面灰色框上的标签.我举个例子:

What I'd like it's to remove those labels on the right side, the ones on gray boxes on the side. I'll give an example:

p <- ggplot(mtcars, aes(mpg, wt, col=factor(cyl))) + geom_point()
p + facet_grid(cyl ~ .)

提前致谢!

胡安

推荐答案

下面会这样做:

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())

这篇关于摆脱那些灰色盒子上的 facet_grid 标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆