How to keep axis labels in one side and axis title in another using ggplot2
问题 I wonder if it is possible (I know it is) to keep the plot's axis labels in one side of the plot and the plot's axis title in the opposite side, specifically in a discrete geom_tile() plot as follows: 回答1: You can use sec.axis = dup_axis() inside scale_x_*() to duplicate both axis then remove what you don't need inside theme() . ggplot(mtcars, aes(x=mpg, y=hp)) + geom_point() + labs(title="mpg vs hp") + scale_y_continuous(position = 'right', sec.axis = dup_axis()) + #remember to check this