On 04/09/2014 02:06 AM, Hurr wrote:
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.
Hi Hurr,
If you want to use pretty:
pretty(1:9)
[1] 0 2 4 6 8 10
you don't necessarily get axis ticks at the same locations as the data
points. Maybe you want to specify your own axis ticks and use those:
axis_ticks<-c(1,4,7,10)
axis(1,at=axis_ticks,labels=1/axis_ticks)
but that seems too obvious. Could you supply an example of what you want
to do?
Jim
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.