【问题标题】:How to print outliers with gnuplot 4.6 boxplot?如何使用 gnuplot 4.6 boxplot 打印异常值?
【发布时间】:2013-03-26 12:16:37
【问题描述】:

我正在尝试使用 gnuplot 4.6 制作箱线图,但我遇到了一些问题。我试图从多个来源找到答案,但没有找到。

例如,以下命令不起作用

gnuplot> set style boxplot
               ^
     expecting 'data', 'function', 'line', 'fill', 'rectangle', or 'arrow'
gnuplot> set style boxplot outliers pointtype 7
                   ^
         expecting 'data', 'function', 'line', 'fill', 'rectangle', or 'arrow'

如果我直接绘制为 GNUPLOT 手册第 45 页中的状态,像这样

gnuplot> plot 'boxplotdata.dat' using (1):2

我刚上x=1,所有点都像“+”一样绘制,但根本没有箱线图。 如果进行处理并使用烛台/晶须图,则可以,但我无法得到异常值...

我的原始数据如下

32  0.521984
32  0.521801
32  0.512350
32  0.519136
32  0.518901
32  0.527961
32  0.506231
32  0.512615
32  0.526872
32  0.520300
32  0.511880
32  0.531184
32  0.510774
32  0.527602
32  0.520770
32  0.517887
32  0.527341
32  0.525647
32  0.525276
32  0.527341

如何打印出异常值 'o'?

【问题讨论】:

  • 你确定你使用的是gnuplot4.6吗?我没有收到这些错误...
  • 对不起,你是对的,我有4.4.3版本,我会尝试更新到4.6,看看会发生什么

标签: gnuplot boxplot outliers


【解决方案1】:

在gnuplot 4.6手册中,p45:

默认情况下,胡须从盒子的末端延伸到最 y 值在四分位数 1.5 倍以内的远点 范围。

因此,异常值必须大 1.5 倍,而您的数据中没有任何异常值(这就是我们在图片中看不到它们的原因)。

这在我的 gnuplot 4.6 MS-Windows 中完美运行:

set style boxplot outliers pointtype 19
set style data boxplot
plot 'data' u 1:2

检查版本,或者尝试重新安装。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-03-06
    • 1970-01-01
    • 1970-01-01
    • 2017-12-21
    • 2013-03-26
    • 1970-01-01
    • 2015-04-06
    • 1970-01-01
    相关资源
    最近更新 更多