[R] 2nd Y-axis text problem
Sion Roberts
s.e.roberts at qmul.ac.uk
Tue Oct 26 18:17:46 CEST 2004
Dear All,
I'm having problems getting text to appear on a second y axis....because
this can only be done within a plot statement and my attempts to add the
label as text didn't work because the "locator" refers to the plot
area....
Any thoughts greatly appreciated.
Thanks in advance,
Sion
>par(mai=c(1,1,1,1.5))
>plot(time[DOY<230],Hmeas[DOY < 230],ylab=expression(paste("Fluxes,
W",m^-2)),xlab="Time of Day,
hours",ylim=c(-100,500),typ="l",lty=1,lwd=1,col=1,axes=F)
>axis(2,at=c(-100,0,100,200,300,400,500),tick=T)
>axis(1,at=c(0,6,12,18,24),tick=T) par(new=T)
>plot(time[DOY<230],Ueddy[DOY<230],xlab="",yaxt="n",ylab="",ylim=c(0,1.6),pch=1,axes=F)
>axis(4,at=c(0,0.4,0.8,1.2,1.6),tick=T) # **problem**
More information about the R-help
mailing list