Here's a Q&D bit of code I wrote up a while back. Dunno if it'll be of
any use in setting up your tickmarks.
# x, n same meaning as in pretty()
# update: check for x neg or zero
# ... is for other args to pretty()
prettylog<- function(x,n=10,base=10,...) {
x<-unlist(x)
if (min(x
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 li
> If you do write your own, the hardest part will be picking the nice tick
> marks. They should be approximately evenly spaced, but at nice round values
> of the original variable: that's hard to do in general. R has the pretty()
> function for the linear scale, and doesn't do too badly on log a
On 5 May 2009, at 19:28, Duncan Murdoch wrote:
On 5/5/2009 1:05 PM, 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, i
On 5/5/2009 1:05 PM, 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
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
6 matches
Mail list logo