|
From: Allin C. <cot...@wf...> - 2011-05-03 01:30:06
|
I'm wondering if there might be an off-by-one bug in gnuplot's
built-in boxplot functionality.
I'm attaching a small data file which I've tried plotting using
the following commands (simplified from boxplot.dem):
set style data boxplot
set pointsize 0.5
set border 2
set xtics ("wage" 1) scale 0.0
set xtics nomirror
set ytics nomirror
plot 'wage.dat' using (1):1 notitle
I calculate quartiles 1 and 3 as 1345 and 2140, respectively, and
this seems to agree with what gnuplot shows for the central box. I
therefore get 795 for the inter-quartile range, and multiplying
this by the default range multiplier of 1.5 I get 1192.5. Adding
this to Q3 gives 3332.5 for the upper whisker limit. The greatest
y-value in the data less than or equal to 3332.5 is 3307, so I'd
expect the upper whisker to extend that far, but it extends only
to about 2600, which could correspond to the next largest y-value,
namely 2613.
That is, I think that according to the docs one should see a
whisker extending to 3307 and three high outliers, but in fact I
see the whisker going to about 2600 and four high outliers. I can
get the result I'd expect to see with the default "range" value of
1.5, if I do
set style boxplot range 1.6
--
Allin Cottrell
Department of Economics
Wake Forest University
|