How to adjust vertical position of axis.title.y once flipped?

时间:2018-06-19 11:16:18

标签: r ggplot2 dplyr

library(tidyverse)

I'm trying to ready a chart for a presentation. As a result I want to flip the y axis label horizontally which I have managed to do with the following:

iris %>% ggplot() + geom_point(aes(x = Sepal.Length, y = Sepal.Width)) +
theme(axis.title.y = element_text(angle=0))

However, at the same time for some unknown reason the title automatically justifies to the top of the y-axis. I can't seem to fix this.

I would like for the title to be centred along the axis once flipped.

I tried vjust but that doesn't do anything.

Any help appreciated.

0 个答案:

没有答案