[Rd] ylab in time series plot (PR#2869)
Ed Kademan
kademan at phz.com
Tue Apr 29 15:04:35 MEST 2003
I am sorry, I accidentally sent off an incomplete version of this
reply while I was composing it. Here is the complete one.
Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
> On 29 Apr 2003, Ed Kademan wrote:
>
> > Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
> >
> > > And the bug is?
> > >
> > > You got a correct plot, with a correct warning.
> > >
> > > On Mon, 28 Apr 2003 kademan at phz.com wrote:
> > >
> > > > You get a warning message when you specify a ylab parameter while
> > > > plotting data whose x's are POSIXct values. Apparently the
> > > > `axis.POSIXct' method tries to reset the ylab---via the ...
> > > > parameter---after it has already been set by higher level methods.
> >
> > No. The bug is that the warning is incorrect.
> >
> > How do you specify a ylab parameter to a time series plot without
> > generating a warning?
>
> [This is not a time-series plot! You are plotting against a date-time
> object, and this has nothing to do with a time series: the object does not
> even have to be in data order.]
>
> You are not able to, but nowhere is it stated that you can -- so it is not
> a bug.
When I look up the manual page for `axis.POSIXct' I get the following.
(I have removed some lines but haven't changed the text in any other
way.)
Functions to plot objects of classes "POSIXlt" and "POSIXct"
representing calendar dates and times.
Usage
plot(x, y, xlab = "", ...)
axis.POSIXct(side, x, at, format, ...)
Arguments
x, at
A date-time object.
y
numeric values to be plotted against x.
xlab
a character string giving the label for the x axis.
... Further arguments to be passed from or to other methods,
typically graphical parameters.
Is this description implicitly leaving open the possibility that R
could generate warning messages even if we follow its advice? Or is
it possible that I am reading it wrong? or that I have a faulty
installation with the wrong documentation? (That page goes on to
describe an example that also generates the warning.)
More information about the R-devel
mailing list