[R] what is meaning of the bubbles in boxplots?

Gavin Simpson gavin.simpson at ucl.ac.uk
Mon Jul 20 10:59:57 CEST 2009


On Mon, 2009-07-20 at 11:18 +0800, Jie TANG wrote:
> Hi ,everyone ,
>   I draw some boxplot figure with the command "boxplot".But in the
> figure,there are some bubbles at the top part of the figure.
> 
>  Can anyone tell me what the correct meaning of these bubbles?and how to
> remove it?

Do you mean the points (circles) shown for example in:

> set.seed(123)
> dat <- rt(10000, df = 3)
> boxplot(dat)

??

If so, these are your *data* and shouldn't be removed. These are the
points that lie further than 1.5 * the length of the box, with a caveat
explained on ?boxplot.stats

You could do

> boxplot(dat, range = 0)

But the resulting plot will require explanation to those used to see a
boxplot sensu Tukey.

G

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%




More information about the R-help mailing list