[Rd] [patch] add=TRUE in plot.default()

Andrew Clausen clausen at econ.upenn.edu
Sun Mar 9 22:58:33 CET 2008


On Sun, Mar 09, 2008 at 04:04:08PM -0400, Duncan Murdoch wrote:
> Part of the reason I didn't like your patch is that it was incomplete: 
> it didn't patch the plot.default.Rd file.

Fair enough -- I wasn't sure whether I was fixing a bug or not.  ("..."
spreads the documentation around a bit.)

> That function already has 
> around 16 parameters; do we really want to add another one, that 
> interacts with some of the ones that are there?

Yes.  The ability to plot things on top of each other is important.
The simplicity created by having a single interface for adding to plots
outweighs the complexity of yet another parameter.

The add parameter only interacts with other parameters superficially --
some parameters of "plot" (like log) are related to the shape of the axes,
and should be inherited from what is on the plot already.

> What you really seem to want is to add it to the generic plot(),

Agreed.

> but it's way too late to go modifying that particular generic.

I agree.  Adding an "add=FALSE" parameter to plot() would generate errors for
methods that don't implement it, so they would all have to be changed
simultaneously, including in private/unreleased code.

So I'd like to settle for second best: adding add=FALSE parameters to many plot
methods.

Cheers,
Andrew



More information about the R-devel mailing list