[R] changing the position of the y label (ylab)

Etienne etiennesky at yahoo.com
Mon Jun 25 23:44:23 CEST 2007


How can I change the position of the ylab, after
enlarging the margins with par(mar=...)? 

Here is the relevant code snippet

----
par(mar=c(5.1,5.1,4.1,2.1))
plot(c(1979,2003),c(40,50),ylim=c(1,73),lab=c(20,10,1),pch=21,col='blue',bg='blue',axes=FALSE,xlab="Years",ylab="Onset/Withdrawl
Date",font.lab=2)
box()
axis(1,las=2)
axis(2,las=2,labels=c('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC','JAN'),at=seq(from=1,to=73,by=6))
axis(3,labels=FALSE)
axis(4,labels=FALSE,at=seq(from=1,to=73,by=6))
----

Thanks



More information about the R-help mailing list