[R] Bug in boxplot(..., add=TRUE) ?

Liaw, Andy andy_liaw at merck.com
Tue Jan 14 12:07:03 CET 2003


It may not be a bug, but I wonder if it's an "unintended feature"...  As
Rich said, it seems unintuitive to have a plot function called with add=TRUE
add axes to existing plot.  This is not documented in either help pages for
boxplot and bxp.

Andy

> -----Original Message-----
> From: Roger Peng [mailto:rpeng at stat.ucla.edu]
> Sent: Monday, January 13, 2003 9:26 PM
> To: Raubertas, Richard
> Cc: 'r-help at stat.math.ethz.ch'
> Subject: Re: [R] Bug in boxplot(..., add=TRUE) ?
> 
> 
> This doesn't appear to be a bug, you can use `axes = FALSE' 
> in the call to
> boxplot().
> 
> -roger
> _______________________________
> UCLA Department of Statistics
> rpeng at stat.ucla.edu
> http://www.stat.ucla.edu/~rpeng
> 
> On Mon, 13 Jan 2003, Raubertas, Richard wrote:
> 
> > R 1.6.1 on Windows NT4:
> > 
> > The boxplot() function appears to draw its own tick marks
> > and axis values even when called with add=TRUE.  As a toy
> > example, try
> > 
> > x <- rnorm(100)
> > f <- factor(rep(1:4, each=25))
> > plot(c(0,4), c(-3,3), type="n", xaxt="n", yaxt="n")
> > boxplot(x ~ f, add=TRUE)
> > 
> > My expectation is that a high-level plotting function will
> > not mess with the axes when called with add=TRUE.  Is this
> > a bug or is my expectation wrong?
> > 
> > Richard Raubertas
> > Biometrics Research, RY84-16
> > Merck & Co.
> > 
> > 
> > 
> --------------------------------------------------------------
> ----------------
> > 
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > http://www.stat.math.ethz.ch/mailman/listinfo/r-help
> >
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 


------------------------------------------------------------------------------




More information about the R-help mailing list