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

查看:79
本文介绍了摆脱那些灰色盒子上的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 ~ .)

提前谢谢!

胡安

推荐答案

以下方法可以做到这一点:

The following would do that:

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天全站免登陆