Skip to content
Prev 5662 / 398502 Next

outliers in boxplot

Angelo Canty wrote:
You are right, outline=T and outwex=k does not exist. 
And not all grahical parameters can be passed (e.g. pch or lty).

To change "pch", try something like
  par(pch="*")
  boxplot(.)


If you want to plot outliers as lines, you should have a deeper look
into that method:
To produce the plot, bxp(.) is called by boxplot.default(.).
So you should modify that function.

Example:

   temp <- boxplot(c(1:5, 10))
   temp  
   ## necessary informations for bxp(.) 
   ## (e.g.  median, ..., outliers)
   my.bxp <- bxp  ## Make your own boxplot function
   fix(my.bxp)  ## modify it (described below)
   my.bxp(temp) ## and draw the plot :-)


In my.bxp(.) you have to change line 30:

   ## Replace:
   points(rep(x, length(out)), out, col = border) # draws outliers
   ## by something like:
   if (length(out) > 0) 
       segments(x - wid/2, out, x + wid/2, out, col = border)
   ## "wid" is length of the lines here.




Regards,
Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._