[R] overlay additional axes

Dylan Beaudette dylan.beaudette at gmail.com
Mon Nov 28 22:56:27 CET 2005


Greetings,

I am trying to add an extra labled axis in position 3 (top x-axis), with 
numbers that do not match up with the existing axes.

Surely this must be possible, and I am just doing it incorectly.

So far I have tried the following:
#make a plot
plot(TIK, type="l", cex=.25, xlim=c(2,32), ylim=c(0,1600))

#try and add a new axis with different numbers in position 3
axis(3,0.154/(2*sin(TIK[,1]/2*pi/180)))

...obviously the nature of the numbers in both axes is quite different. 

is it possible to have the bottom axis (degrees 2Theta) line up with a 
corosponding top axis of 0.154/(2*sin(TIK[,1]/2*pi/180)) ?

thanks in advance!

-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341




More information about the R-help mailing list