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

MacQueen, Don macqueen1 at llnl.gov
Mon Apr 7 18:30:41 CEST 2014

If you want to customize tick mark labels, use the axis() function.

Something along the lines of

plot(x,y, xaxt='n')
xat <- pretty(x)
axis(1, at=xat, labels=1/xat)


Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550

On 3/31/14 3:25 PM, "Hurr" <hill0093 at umn.edu> wrote:

>How can I label existing axis tick marks with a
>simple function of axis value like 1/AxisValue?
>It seems like this should be an operation where
>I just use the formula.
>View this message in context:
>Sent from the R help mailing list archive at Nabble.com.
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list