[R] ylab on secondary y axis

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Thu Jun 9 18:29:10 CEST 2005


See ?mtext.

--sundar

Hai Lin wrote:
> Dear R users:
> 
> I am trying to add a label on axis(4) but I don't find
> any reference in R archives. Could you please help me
> out?
> 
> Thanks in advance.
> 
> The followings are the data set and what I have done:
> 
> Sample data:
> 
> time	 y1 y2
> 2	9 24.396
> 4	7.667 19.082	
> 10	4.667 73.984
> 
> Commands:
> plot(time,y1,type='l',col='red',ylab="Relative
> levels", xlab="Age of Mice",ylim=c(0,20))
> points(time,y1 col="red", pch=19)
> 
> op <-par(new=T)
> plot(time,y2,type='l',
> col='green',axes=F,xlab="",ylab="", ylim=c(0,80))
> points(time,y2,col='green',pch=24)
> axis(4)
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list