From arnima at u.washington.edu  Wed Nov  8 21:14:31 2006
From: arnima at u.washington.edu (arnima at u.washington.edu)
Date: Wed,  8 Nov 2006 21:14:31 +0100 (CET)
Subject: [Rd] boxplot ignores 'boxfill' (PR#9352)
Message-ID: <20061108201431.0ADA956225@slim.kubism.ku.dk>

The boxplot.default() function ignores argument 'boxfill' passed by user:

     x <- rnorm(100)
     boxplot(x, boxfill="blue")
     boxplot(x, pars=list(boxfill="green"))

As the original creator of the 'boxfill' argument, I'd like to propose the 
following change to the if(plot) clause in boxplot.R:

     if(plot) {
         if(is.null(pars$boxfill) && is.null(args$boxfill))
             pars$boxfill <- col
         do.call("bxp",
             c(list(z, notch=notch, width=width, varwidth=varwidth,
             outline=outline, log=log, border=border, pars=pars,
             horizontal=horizontal, add=add, at=at), args[namedargs]))
         invisible(z)
     }


What I've done is (1) setting boxfill=col only when that is desired, (2) 
named the 'width' list element to avoid confusion, and (3) rearranged the 
list so it has the same order as args(bxp).

Thanks,
Arni

R 2.4.0-patched on WinXP



[Rd] boxplot ignores 'boxfill' (PR#9352)
arnima at u.washington.edu