# [R] Plotting log-axis with the exponential base to a plot wi

(Ted Harding) Ted.Harding at manchester.ac.uk
Sun May 9 21:11:42 CEST 2010

```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 ------------------------------

```