r - How to give title at the bottom of the plot using ggplot2 -


this question has answer here:

i sorry basic question.

i give title @ bottom of plot. how can that?

p1 <-ggplot(data=df, aes(x=variable, y=value, fill=variable)) +    geom_boxplot() + theme_bw() +  theme(legend.position="none") + ylim(0,10) +  ggtitle("my title") +   labs(x="", y="y axis") + theme(panel.grid.major = element_line(colour = "black")) + theme(axis.title.y = element_text(size = 22,face="bold"))+ theme(plot.title=element_text(size=30,face="bold")) + theme(axis.text.y = element_text(size=18)) + theme(axis.text.x = element_text(size=22,face="bold"))  + scale_fill_manual(values = c("darkgreen","darkmagenta")) 

using

+theme(plot.title = element_text(vjust = 10)) 

or take on page:

plot title @ bottom of plot using ggplot2