[Rd] boxplot ignores 'boxfill' (PR#9352)

From: <arnima_at_u.washington.edu>
Date: Wed 08 Nov 2006 - 20:14:31 GMT


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



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu Nov 09 07:24:20 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 08 Nov 2006 - 21:30:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.