问题
delme <- exp(rnorm(1000,1.5,0.3))
boxplot(delme,log="y")
boxplot(log10(delme))
Why are the whiskers different in this 2 plots?
Thanks Agus
回答1:
I would say that in your first plot you just changed the y axis to log, so the values you plot still range between 1 and 10. In this plot the y
axis is a log scale. The whiskers on this axis look different because the space between each "tick" (ie axis break) is not constant (there is more space between 2 and 4 than between 10 and 8)
In the second plot, you take the log of the values then plot them, so they range from .2 to 1, and are plotted with a linear y axis.
Look at the summary
for both of the normal and log
transformed dataframes
来源:https://stackoverflow.com/questions/28296634/r-why-is-boxplotx-log-y-different-from-boxplotlogx