[R] quick square root axes

Jim Lemon jim at bitwrit.com.au
Wed May 6 12:18:18 CEST 2009


Markus Loecher wrote:
> Dear R users,
> while I enjoy the built-in log argument to the plot() function, I wished it
> would be as easy to create more general custom transformed axes such as
> sqrt(), logit, etc...
>
> for example, instead of
>  plot(x=exp(rnorm(10)), y=(1:10)^4, log = "xy"), sth. along the lines of
>  plot(x=exp(rnorm(10)), y=(1:10)^4, trans = list(x = log, y = sqrt))
> to encode the desired transfomation.
>
> This involves just transforming the xy values and creating nice tick marks
> at the appropriate positions.
> Before trying to write my own function, I wanted to see if that
> functionality already exists in another package ?
>
>   
Hi Markus,
The axis.mult function in plotrix does this for linear multipliers, but 
a more general transformation is a bit harder. I'll have a look at the 
log axis transformation and scratch my head a bit.

Jim




More information about the R-help mailing list