That looks to me like it might be buggy. At least I would have expected vjust to do _something_.
In terms of the practical issue, you can adjust the distance between the title and the axis with margin, e.g. ggplot(data=x,aes(x=V2,y=V2))+theme(axis.title.y=element_text(margin = margin(0, 5, 0, 0))) Best, Ista On Tue, Dec 22, 2015 at 12:59 PM, Ryan Utz <utz.r...@gmail.com> wrote: > Hi all, > > I cannot for the life of me get my axis titles to adjust vertically in a > ggplot. I've seen several posts about this and have tried everything: > keeping vjust within 0 and 1, adjusting the margins, etc. hjust is behaving > just as it should but vjust just mocks me in silence. No error message is > produced. > > Here's a sample code: > > x=data.frame(sample(1:10)) > x[,2]=sample(1:10) > > ggplot(data=x,aes(x=V2,y=V2))+theme(axis.title.y=element_text(vjust=.1,hjust=0.6), > plot.margin=unit(c(1,1,2,2),'cm')) > > No matter what I put into vjust, nothing happens. Am I missing something > obvious?? > > Thanks ahead of time for any help, > Ryan > > > -- > > Ryan Utz, Ph.D. > Assistant professor of water resources > *chatham**UNIVERSITY* > Home/Cell: (724) 272-7769 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.