[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] wrote:
>Can anyone tell me how to plot on the same graph two different functions >(of x) using two differnt y scales (axes 2 and 4)? The only way I've found is to use the grid library and push.viewport(). ((...) means substitute with whatever appropriate, use help()) library(grid) grid.newpage() push.viewport(viewport(yscale=c(0,500),w=.75,h=.75,xscale=c(0:100))) grid.poins(...) # Plots data point with an y-scale of 0-500 grid.xaxis(...) grid.yaxis(...) # Draws the left y-axis push.viewport(viewport(yscale=c(0,10),xscale=c(0:100))) grid.poins(...) # Plots data point with an y-scale of 0-10 grid,yaxis(main=FALSE,...) # Draws the right y-axis Morten -- Morten Sickel Norwegian Radiation Protection Authority http://www.nrpa.no ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help