Re: [Rd] wishlist: par(ann=FALSE) applied to hist?

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue, 12 Aug 2008 20:07:20 +0100 (BST)

On Tue, 12 Aug 2008, Ben Bolker wrote:

> Prof Brian Ripley wrote:

>> On Tue, 12 Aug 2008, Ben Bolker wrote:
>>
>>> par(ann=FALSE) appears to have no effect on
>>> hist.default; it would be nice if it did ...
>>> (boxplot, which plots via bxp, which calls
>>> internal do_title, does -- in a quick search
>>> I can't figure out where the value of ann
>>> takes effect ...)
>>
>>> From the ?par:
>>
>> 'ann' If set to 'FALSE', high-level plotting functions calling
>> 'plot.default' do not annotate the plots they produce with
>> axis titles and overall titles. The default is to do
>> annotation.
>>
>> So strictly this is correct, as plot.histogram does not call plot.default.
>> The par is only used at R level, as a default for an argument in
>> plot.default and never as an in-line parameter.
>>
>> So I think what you are asking for is a 'ann' argument to plot.histogram,
>> which would then be passed down from hist(). The only issue then is if
>> par("ann") should set the default, and the current documentation says not.
>>
>> Does that meet your needs?
>>
>
>  Hmm.   I understand that this isn't a bug (I didn't claim it was) --
> the ideal behavior would be for hist() to produce a plot without
> annotation when par("ann") was FALSE.  That's distinct from
> hist(x,ann=FALSE) [which would be equivalent, I guess, to
> hist(x,xlab="",ylab="",main="")], which isn't as useful,

and sub=NULL (NULL is a better default than "").

> unless the default were set to par("ann") ...
> (and yes, I realize that would change user-visible behavior).
> This isn't at all necessary, just something that would change
> R's behavior in the direction of my naive expectations (which
> I might share with other users ... ?)

'ann' is another of those graphical parameters which really isn't (like 'type' and 'asp' used to be).

We can canvass more widely about the default: the basic implementation took 5 mins (+ testing yet to be done).

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue 12 Aug 2008 - 19:10:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 12 Aug 2008 - 20:37:55 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.

list of date sections of archive