标签: r ggplot2
这是我的情节:
ggplot(iris,aes(Sepal.Length,Species, fill = Species)) + geom_col() + theme(axis.text.y = element_text(hjust = 0))
我想要的只是将 y 轴向右移动并将它们向左对齐以将它们包含在条形中。
当我更改 hjus = 时,标签不会左对齐/对齐。
hjus =
有什么帮助吗?
答案 0 :(得分:1)
您可以使用geom_text():
geom_text()
ggplot(iris,aes(Sepal.Length,Species, fill = Species)) + geom_col() + geom_text(aes(x = 100, label = Species))