2013-04-04 19 views
0

我想用gnuplot 4.6获得boxplot,但是我遇到了一些问题。我试图从几个来源找到答案,我没有找到答案。如何用gnuplot 4.6 boxplot打印离群值?

例如,下面的命令不起作用

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,所有点标绘为'+',但根本没有箱形图。 如果做加工和使用的蜡烛/ whiskerplots,那么它是好的,但我不能让离群...

我的原始数据如下

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'?

+0

您确定您使用的是gnuplot4.6吗?我没有得到那些错误... – mgilson 2013-04-04 17:20:14

+0

对不起,你是对的,我有版本4.4.3,我会尝试更新到4.6,看看它发生了什么 – Humberto 2013-04-05 05:42:23

回答

3

在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 

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