Skip to content

stripchart ignores main title option (PR#12202)

2 messages · j.curran at auckland.ac.nz, Brian Ripley

#
Full_Name: James Curran
Version: 2.7.1
OS: Windows XP/Vista
Submission from: (NULL) (130.216.51.81)


stripchart ignores the main title option. For example, in the documentation 

     stripchart(decrease ~ treatment,
         main = "stripchart(OrchardSprays)", 
         vertical = TRUE, log = "y", data = OrchardSprays)


does not yield a plot with "stripchart(OrchardSprays)" at the top of the plot.
Looking at the source code of stripchart.default there is:

....
title(xlab = xlab, ylab = ylab)
....

I would have thought the main would have got wrapped up in the ... that is sent
to the plot command, but then I don't know enough about it.
#
Strictly this is correct:

      ...: additional parameters passed to the default method, or by it
           to 'plot' and 'axis' to control the appearance of the  plot.

Note, not title(), and plot() is called with ann=FALSE.  So the fix is to 
call title() separately.

It should now be safe to pass '...' to title() (it used not to be) so I'll 
add this a a new feature in 2.8.0.
On Thu, 7 Aug 2008, j.curran at auckland.ac.nz wrote: