I am planning to plot my data on log scale (y-axis). There is a parameter in plot function, which is plot( ..., log="y", ...) While, the problem is that it is with base of e. Is there a way to let me change it to 10 instead of e? Thanks
Jing Shen wrote:> I am planning to plot my data on log scale (y-axis). There is a > parameter in plot function, which is > plot( ..., log="y", ...) > While, the problem is that it is with base of e. Is there a way to let > me change it to 10 instead of e?But this is simpley a fixed multiple, and the axis annotation shows the true values. Hence there would be absolutely NO difference in the plot, and we do not need to add redundancy here! Uwe Ligges> Thanks > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
On 6/29/05, Jing Shen <jshen6 at gmail.com> wrote:> I am planning to plot my data on log scale (y-axis). There is a > parameter in plot function, which is > plot( ..., log="y", ...) > While, the problem is that it is with base of e. Is there a way to let > me change it to 10 instead of e? >Is your question how to get the axis labels to be powers of 10? In that case, plot(1:100, log = "y", yaxt = "n") # do not show y axis axis(2, c(1,10,100)) # draw y axis with required labels
Thanks to all of you! Yes, I want to get the axis labels to be powers of 10. I am going to try the code you recommended. Thanks a lot, Jing On 6/30/05, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:> On 6/29/05, Jing Shen <jshen6 at gmail.com> wrote: > > I am planning to plot my data on log scale (y-axis). There is a > > parameter in plot function, which is > > plot( ..., log="y", ...) > > While, the problem is that it is with base of e. Is there a way to let > > me change it to 10 instead of e? > > > > Is your question how to get the axis labels to be powers of 10? > In that case, > > plot(1:100, log = "y", yaxt = "n") # do not show y axis > axis(2, c(1,10,100)) # draw y axis with required labels >