[R] Label axis tick marks with a simple function of axis value

Hurr hill0093 at umn.edu
Tue Apr 8 18:06:09 CEST 2014


Don suggested something like this:
h=c(1,2,3,4,5,6,7,8,9)
v=c(9,8,7,6,5,4,3,2,1)
plot(h,v,xaxt='n')
xat=pretty(h)
axis(1,at=xat,labels=1/xat)
But it puts the tick marks at the data-x-locations.
If the tick locations are not automatic or
automatically separate from the data locations, then
I want to tell it where to put them using 
a separate indicator. I am not familiar enough with
R to find the answer.
But if it would work, it would be valuable.




--
View this message in context: http://r.789695.n4.nabble.com/Label-axis-tick-marks-with-a-simple-function-of-axis-value-tp4687917p4688399.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list