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
Here's a QD 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
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
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 =
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,
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
6 matches
Mail list logo