zze-CHOQUET Denis stagiaire FTRD/DMI/SOP
2001-Jul-13 08:04 UTC
[R] Histogram with logarithmic scale
> My question is not about statistics but more obviously about an R command. > I would like to plot an histogram with a logarithmic scale. I have > searched through R documentation and have read about the "log" option. > What matters is that it does not work with the hist() function. I'm > working with R version 1.2.3 . Maybe the problem has been solved in R 1.3 > . > Thanks for your help, > Regards, > Denis Choquet-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
zze-CHOQUET Denis stagiaire FTRD/DMI/SOP
2001-Jul-13 09:45 UTC
[R] Histogram with logarithmic scale
As I thought, my question was not very interesting. I have now found a
solution. The problem, which I think I had not explained clearly, was that I
had values >=0 and I wanted to plot an histogram of log(values+1) but with
the initial axis, (not the logarithmic). These are the commands I used:
ff_function(x)
{
log(x+1)
}
data2_sapply(data,FUN="ff")
histo_hist(data2)
bornes_histo$mids+(histo$mids[2]-histo$mids[1])/2
ax_round(exp(bornes)-1,2)
axis(3,bornes,labels=ax)
This is OK for me.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._