R:为什么boxplot(x,log =“ y”)与boxplot(log(x))不同? [英] R: why is boxplot(x,log="y") different from boxplot(log(x))?

查看:179
本文介绍了R:为什么boxplot(x,log =“ y”)与boxplot(log(x))不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

delme <- exp(rnorm(1000,1.5,0.3))
boxplot(delme,log="y")
boxplot(log10(delme))

为什么这两个地块的晶须不同?

Why are the whiskers different in this 2 plots?

感谢
Agus

Thanks Agus

推荐答案

我想说,在您的第一个情节中,您只是更改了y轴记录,因此您绘制的值仍在1到10之间。在此图中, y 轴是对数刻度。该轴上的晶须看起来有所不同,因为每个刻度之间的间隔(即轴中断)不是恒定的(2和4之间的间隔大于10和8之间的间隔)

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)

在第二个图中,您将取值的对数,然后对其进行绘制,因此它们的范围为.2至1,并使用线性y轴进行绘制。

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

这篇关于R:为什么boxplot(x,log =“ y”)与boxplot(log(x))不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆