Reputation: 8124
In R. I currently have this ggplot
:
And I am looking to get the titles right in the center of the square, like this:
I took a look at ?element_text
but there is no position/offset setting. How can I move offset x-axes in a ggplot
?
Upvotes: 1
Views: 348
Reputation: 39595
Maybe try with the theme()
I have added:
library(ggplot2)
#Code
ggplot(iris,aes(x=Species,y=Sepal.Length))+
geom_boxplot(aes(fill=Species))+
theme(axis.text.x = element_text(angle = 90,vjust = 0.5))
Output:
Upvotes: 2