[R] xy.coords and log10

Duncan Murdoch murdoch at stats.uwo.ca
Tue Nov 20 18:50:02 CET 2007


On 11/20/2007 11:22 AM, Alexy Khrabrov wrote:
> xy.coords can have a log="xy" parameter which then plot interprets to  
> use log scale.
> I wonder whether plot can be instructed in a similar way to use log10  
> scale instead of natural logs.

I still don't see the problem.  When I do

 > x <- 1:100
 > y <- (1:100)/10
 > plot(xy.coords(x, y, log="xy"))

I don't see a log scale being used.  To get that, I'd need

plot(xy.coords(x, y, log="xy"), log="xy")

and in this case, I can't see how you could tell what base is being 
used:  the tick marks are labelled in the original scale.

Duncan Murdoch

> 
> Cheers,
> Alexy
> 
> On Nov 20, 2007, at 7:01 PM, Duncan Murdoch wrote:
> 
>> On 11/20/2007 10:41 AM, Alexy Khrabrov wrote:
>>> Is there a way to teach xy.coords, when given log="xy", or just  
>>> "x"  or "y" separately, to do a decimal log10 instead of the  
>>> natural log?
> 
>> xy.coords doesn't do any transformation other than setting non- 
>> positive values to NA.  So your question doesn't make sense; could  
>> you elaborate on what you're seeing that you don't want to see?



More information about the R-help mailing list