[Rd] automatically adding smooth to plot: options("plot.add.smooth")
Duncan Murdoch
murdoch at stats.uwo.ca
Mon Sep 19 14:47:01 CEST 2005
On 9/19/2005 8:18 AM, Martin Maechler wrote:
> I've changed the subject in the hope some more people would
> voice an opinion...
>
>>>>>> "MM" == Martin Maechler <maechler at stat.math.ethz.ch>
>>>>>> on Sat, 17 Sep 2005 17:29:20 +0200 writes:
>
>>>>>> "Wst" == Werner Stahel <stahel at stat.math.ethz.ch>
>>>>>> on Fri, 16 Sep 2005 09:37:02 +0200 writes:
>
>
> Wst> ........................
> Wst> ........................
> Wst> ........................
>
> Wst> For most plots, I like to see a smoother along with the
> Wst> points. I suggest to add the option to include
> Wst> smoothers, not only as an argument to plot.lm, but even
> Wst> as an option(). I have heared of the intense
> Wst> discussions about options(). With Martin, we arrived
> Wst> at the conclusion that options() should never influence
> Wst> calculations and results, but is suitable to adjust
> Wst> outputs (numerical: digits=, graphical: smooth=) to the
> Wst> user's taste.
>
> MM> {and John Fox agreed, `in general'}
>
> MM> That could be a possibility, for 2.2.0 only applied to
> MM> plot.lm() in any case, where plot.lm() would get a new
> MM> argument
>
> MM> add.smooth = getOption("plot.add.smooth")
>
> MM> What do people think about the name? it would ``stick
> MM> with us'' -- so we better choose it well..
>
> No reaction so far....
>
>
> I've realized that I can introduce this very easily into
> plot.lm():
>
> Instead of the former argument
>
> panel = points
>
> I use the new ones
>
> panel = if(add.smooth) panel.smooth else points,
>
> add.smooth = isTRUE(getOption("plot.add.smooth")),
>
> - - -
>
> Now I even propose to have
>
> options(add.smooth = TRUE)
>
> as a new default.....
>
> Do I get a reaction now?
I like the name "add.smooth" (as used at the bottom) better than
"plot.add.smooth" (as used a few lines up).
With that choice, I think it's a good idea.
Duncan Murdoch
More information about the R-devel
mailing list