[R] vjust unresponsive (ggplot2)

Ryan Utz utz.ryan at gmail.com
Tue Dec 22 18:59:34 CET 2015


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]]



More information about the R-help mailing list