Hi, i have a problem with histogram in Rstudio. I have to represent with the funtion "hist" the distribution of several of rainfall observations. Most of them are next to 0 so preferred to create a vector of transformed data (log(x)). So I want to represent the transformed values (log scale) in histogram but with the untransformed linear values in x-axis.
I know that with the function "plot" for scatterplot I can obtain it by adding in the code log="x" but I now want a histogram, not other.
my code:
hist( log_rainfall, xlab = "rainfall [mm/h] in ln", ylab = "",
prob= TRUE, col = "cyan2", axes=FALSE )
In vector "place1_lin" I have the original values.
In vector "place1_log" I replaced all original values in log scale (I replaced log(0) with log(0.1)=-2,3 in order to avoid "-Inf").
I'd like to obtain in x-axis of the histogram the original values, not the log scale ones.
Thank you.
FFR, reprex is actually a package that helps you run self-contained code, and copies it to your clipboard formatted it with images etc. so you can paste it right in here: