ggplot, use both vjust and hjust for the same graph, how to code this?

user11916948 :

I want to use both vjust and hjust in ggplot, change direction of the title both horizontally and vertically. This code doesn't work. How do I accomplish this? Thanks!

theme(plot.title =element_text(hjust=0.5, vjust=0.5))
Matt :

I think you can accomplish this by using two lines:

theme(plot.title =element_text(hjust=0.5)) +
theme(plot.title =element_text(vjust=0.5))

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=27258&siteId=1