0

In the code below, how can I align title (main ="Maximum Annual Temperature Data In Celsius") to the center of the plot?

autoplot(maxtemp, xlim = c(1990,2020), xlab = "Year", ylab = "Temperature in Celsius", 
                  main ="Maximum Annual Temperature Data In Celsius", colour = "orange")
Phil
  • 5,491
  • 3
  • 26
  • 61
Kris
  • 1
  • 1
  • Welcome to Stack Overflow! You should provide a [minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). It should be [minimal, but complete and verifiable example](https://stackoverflow.com/help/minimal-reproducible-example). Your question should be clear and specific. Would you [edit] your question and add output of `dput(head(maxtemp))`? – M-- Mar 13 '20 at 23:34
  • 1
    Add this: `+ theme(plot.title=element_text(hjust=0.5))` – Edward Mar 13 '20 at 23:38
  • Excellent. It worked. Thanks. – Kris Mar 14 '20 at 00:06

0 Answers0