move axis labels ggplot

This is an easy workaround, based on the answer provided here

Just add a line break; \n, at the start of your axes title; xlab("\nYour_x_Label") (Or at the end if you need to move your y label).

It doesn't offer as much control as Eduardo's suggestion in the comments; theme(axis.title.x = element_text(vjust=-0.5)), or use of margin, but it is much simpler!


You can adjust the positioning of the x-axis title using:

+ opts(axis.title.x = theme_text(vjust=-0.5))

Play around with the -0.5 "vertical justification" parameter until it suits you/your display device.

Tags:

R

Ggplot2