如何在ggplot中为R转动标签?

问题描述 投票:0回答:1

我想转动情节或标签,使它们适合分组图。

这是我正在使用的命令。

ggplot(bank,aes(job))+geom_bar(aes(fill=respuesta))

提前致谢!

r ggplot2 label aes geom-bar
1个回答
1
投票

在@teunbrand的评论中解决:

添加+ coord_flip()以切换x和y轴或+ theme(axis.text.x = element_text(angle = 90))以旋转x轴文本标签。

© www.soinside.com 2019 - 2024. All rights reserved.