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: http://r.789695.n4.nabble.com/Label-axis-tick-marks-with-a-simple-function-of-axis-value-tp4687917.html Sent from the R help mailing list archive at Nabble.com.
Jim Lemon
2014-Mar-31 22:36 UTC
[R] Label axis tick marks with a simple function of axis value
On 04/01/2014 09:25 AM, Hurr 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. >Hi Hurr, You can do this with boxed.labels (plotrix) if you know the position of the axis labels. If not, maybe axis.mult (also plotrix) will help. Jim
MacQueen, Don
2014-Apr-07 16:30 UTC
[R] Label axis tick marks with a simple function of axis value
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 -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 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: >http://r.789695.n4.nabble.com/Label-axis-tick-marks-with-a-simple-function >-of-axis-value-tp4687917.html >Sent from the R help mailing list archive at Nabble.com. > >______________________________________________ >R-help at 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.