The default ggplot axis titles are the variable names:
library(ggplot2)
ggplot(mtcars, aes(cyl, wt))
geom_point()
CodePudding user response:
I am not sure what your reason is to put it as a subtitle. Perhaps it is more worthwhile to simply move the position of the x-axis label?
ggplot(mtcars, aes(cyl, wt))
geom_point()
scale_x_discrete(position = "top")