From murdoch at stats.uwo.ca  Mon Sep 19 14:47:01 2005
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Mon, 19 Sep 2005 08:47:01 -0400
Subject: [Rd] automatically adding smooth to plot:
	options("plot.add.smooth")
In-Reply-To: <17198.44159.670311.662705@stat.math.ethz.ch>
References: <17190.57225.254938.977464@stat.math.ethz.ch>	<17194.30238.436418.752419@stat.math.ethz.ch>	<17196.13904.78468.758438@deb8.math.ethz.ch>
	<17198.44159.670311.662705@stat.math.ethz.ch>
Message-ID: <432EB345.801@stats.uwo.ca>

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



[Rd] automatically adding smooth to plot: options("plot.add.smooth")
Duncan Murdoch