Elisabeth Bjerke Rastad
2010-May-10 17:15 UTC
[R] [Fwd: Re: Plotting log-axis with the exponential base to a plot with the default logarithm base 10]
Hello! Thank you for answering! What I am trying to do is to plot my raw values (biomass of different species) on a logaritmic y-axis with the base of e. When I type "log="y"", the axis transforms into a logaritmic axis with the base of 10. Best regards, Elisabeth> Dear Elisabeth, > > I'm not sure if I have understood your question -- are you trying > to use a different logarithmic base? > > Kind regards, > > Xianwen > > On Sun, May 9, 2010 at 8:05 PM, Elisabeth Bjerke Rastad > <ebr024 at post.uit.no> 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) >> >> ______________________________________________ >> R-help at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > > > > -- > Xianwen Chen, M.Sc. > Scientific assistant, BFE, UiT (www.uit.no) > Tel.: +47 776 46 112 | Fax: +47 776 46 020 > >
(Ted Harding)
2010-May-10 21:48 UTC
[R] [Fwd: Re: Plotting log-axis with the exponential base to
Elisabeth, question to you: How is it that you recognise that it is "a logaritmic axis with the base of 10", as opposed to any other base? Ted. On 10-May-10 17:15:04, Elisabeth Bjerke Rastad wrote:> Hello! > Thank you for answering! > What I am trying to do is to plot my raw values (biomass of different > species) on a logaritmic y-axis with the base of e. When I type > "log="y"", > the axis transforms into a logaritmic axis with the base of 10. > > Best regards, > Elisabeth > >> Dear Elisabeth, >> >> I'm not sure if I have understood your question -- are you trying >> to use a different logarithmic base? >> >> Kind regards, >> >> Xianwen >> >> On Sun, May 9, 2010 at 8:05 PM, Elisabeth Bjerke Rastad >> <ebr024 at post.uit.no> 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) >>> >>> ______________________________________________ >>> R-help at r-project.org mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-help >>> PLEASE do read the posting guide >>> http://www.R-project.org/posting-guide.html >>> and provide commented, minimal, self-contained, reproducible code. >>> >> >> >> >> -- >> Xianwen Chen, M.Sc. >> Scientific assistant, BFE, UiT (www.uit.no) >> Tel.: +47 776 46 112 | Fax: +47 776 46 020 >> >> > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 10-May-10 Time: 22:48:35 ------------------------------ XFMail ------------------------------
Mark Difford
2010-May-11 08:01 UTC
[R] [Fwd: Re: Plotting log-axis with the exponential base to a plot with the default logarithm base 10]
Elisabeth, You should listen to Ted (Harding). He answered your question with:>> 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...And he has tried to help you further by asking you to answer the following question:>> How is it that you recognise that it is >> "a logaritmic axis with the base of 10", as opposed to any other base?Maybe a little graphic demonstration (run the script below) will help to convince you. The top row of the figure re-poses Ted's question, viz "How do you know which logarithmic base was used to plot which sub-figure?" You will see from my script that the first is plotted using natural logs, whereas the next two use logs to base 10. (The last of them uses R's log="y" argument.) What's the difference? The first two sub-figures on the bottom row show the scales that were hidden in the sub-figures above them (from the script you will see that all I did was turn off the annotation/labelling of the scale). The last sub-figure on the bottom row is identical in __appearance__ to that above it. However, as you will see from my script, it plots data that have been transformed to natural logarithms. For scale-annotation, however, I have used raw data values. That was Ted's first point: it doesn't matter which base of logarithm your data have been transformed to if you annotate the scale using (backtransformed) raw values. ## Show that log="y" does the job you want done even if internally it uses logs to the base 10 ## rather than natural logarithms par(mfrow=c(2,3)) plot(log(1:10), yaxt="n", ylab="") plot(log10(1:10), yaxt="n", ylab="") plot((1:10), log="y") plot(log(1:10)) plot(log10(1:10)) plot(log(1:10), yaxt="n") axis(side=2, at=sapply(c(1,2,5,10), FUN=function(x) log(x)), labels=c(1,2,5,10)) Regards, Mark -- View this message in context: http://r.789695.n4.nabble.com/Fwd-Re-Plotting-log-axis-with-the-exponential-base-to-a-plot-with-the-default-logarithm-base-10-tp2172435p2173481.html Sent from the R help mailing list archive at Nabble.com.
Possibly Parallel Threads
- Plotting log-axis with the exponential base to a plot with the default logarithm base 10
- [Fwd: Re: Plotting log-axis with the exponential base to a plot with the default logarithm base 10]
- Plotting log-axis with the exponential base to a plot wi
- avas and ace
- [sm.density.compare] scale up y-axis and additional line type