If you have a graph with two y-axes like: plot(...) #1st graph par(new=T) plot(.....,axes=F,xlab="",ylab="") #plot second axis(4) # put axes on the right side How do you put a ylab to that second axis? Thanks, Jorge
See ?mtext On July 30, 2003 10:24 am, Jorge A Ahumada wrote:> If you have a graph with two y-axes like: > > plot(...) #1st graph > par(new=T) > plot(.....,axes=F,xlab="",ylab="") #plot second > axis(4) # put axes on the right side > > How do you put a ylab to that second axis? > > Thanks, > > Jorge > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Both of the following work for me: plot(1:2) axis(4) mtext("right y axis", side=4, line=-1.5) par(mar=c(5,4,4,5)+.1) plot(1:2) axis(4) mtext("right y axis", side=4, line=3) hope this helps. spencer graves Jorge A Ahumada wrote:> If you have a graph with two y-axes like: > > plot(...) #1st graph > par(new=T) > plot(.....,axes=F,xlab="",ylab="") #plot second > axis(4) # put axes on the right side > > How do you put a ylab to that second axis? > > Thanks, > > Jorge > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help