0

When plotting with ggplot2, the axes labels are on the left and bottom. Is it possible to change the x axis to be on top of the plot instead?

ggplot(mtcars, aes(wt, mpg)) + geom_point()

I really thought there would be some theme(axis.position = "top") option but couldn't find it

DeanAttali
  • 25,268
  • 10
  • 92
  • 118
  • 1
    possible duplicate of [this](http://stackoverflow.com/questions/21035101/ggplot2-move-x-axis-to-top-intersect-with-reversed-y-axis-at-0) or [this](http://stackoverflow.com/questions/30121796/move-the-x-axis-on-top-r-ggplot2) – Mamoun Benghezal May 29 '15 at 08:56
  • You have to mess about at the grob level. http://stackoverflow.com/questions/21987834/display-y-axis-for-each-subplot-when-faceting/21994581#21994581 and http://stackoverflow.com/questions/22318186/add-ticks-without-labels-on-the-top-of-a-bar-plot-in-ggplot2/22335684#22335684 and there are a few other examples floating about on SO. – user20650 May 29 '15 at 12:13
  • Thanks I couldn't find these duplicated myself, I'll close my question – DeanAttali May 29 '15 at 18:34

0 Answers0