[R] Plotting log-axis with the exponential base to a plot wi
Elisabeth Bjerke Rastad
ebr024 at post.uit.no
Sun May 9 22:15:56 CEST 2010
Hello Ted!
Thank you a lot for your reply!!!
I will try to explain again; what I want is a logarithmic scaled y-axis
with the base of e (not 10). And the values I would like to use in the
plot are the raw values (not transformed in any way). Do you still think
that the base of log does not matter in this case (wheather it is e or 10
as a base)?
Elisabeth
> On 09-May-10 18:10:27, Elisabeth Bjerke Rastad wrote:
>> Hello!
>> I have a problem which I have tried to solve for several days now..
>> I have plottet a lineplot.CI in the library "sciplot", and I am
>> trying to plot it with a logaritmic y-axis (with exponential base).
>>
>> The problem is that; when I type "log "y"", the axis transforms
>> into the logaritmic of base 10.
>>
>> I wonder if someeone could tell me how to specify that I would like
>> to use the exponential logaritmic y-axis. I have tried a lot (but
>> obviously not all, I guess this problem is possible to solve..)
>>
>> Hope you would like to help me! Thank you a lot in advance!!
>> Greetings,
>> Elisabeth B. Råstad
>> (Master's student, Norway)
>
> I think there may be some misunderstanding here. Or else you have
> not fully explained what you want.
>
> When you use plot(Y,log="y") (and lineplot.CI() is simply a wrapper
> for plot()) the vertical axis is scaled logarithmically with the
> numerical annotations corresponding to the *raw* values of Y,
> not to their log-transformed values. Therefore it does not matter
> what base of logarithms is used, since (for instance)
>
> log(y) = log(10)*log10(Y)
>
> so it is simply a linear transformation of the log scale and,
> since the *raw* values are used to annotate the axis it would
> make no difference to the plot.
>
> Compare for instance
>
> Y <- 10*runig(100)
> plot(Y,log="y")
>
> with
>
> plot(5*Y,log="y")
>
> I don't see anything there which is tied to the base of logs.
>
> It may be that what you want is the plot of the logarithm
> (i.e. the annotation of the Y-axis is in terms of log(Y),
> not in terms of raw Y).
>
> In that case you will need to play with the lower-level graphical
> paramaters such as "yaxp"; but is this is so then please confirm
> in more detail!
>
> Ted.
>
>
> --------------------------------------------------------------------
> E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
> Fax-to-email: +44 (0)870 094 0861
> Date: 09-May-10 Time: 20:11:38
> ------------------------------ XFMail ------------------------------
>
More information about the R-help
mailing list