Skip to content

Plot Dates (PR#2737)

2 messages · possolo@crd.ge.com, Uwe Ligges

#
Full_Name: Antonio Possolo
Version: 1.6.2
OS: Linux & Windows2000
Submission from: (NULL) (192.35.44.3)


x <- as.POSIXct(strptime(c("1993-5-11", "1994-11-23",
                           "1995-7-8", "1996-10-15"), format="%Y-%m-%d"))
y <- c(15, 32, 47, 61)
plot(x, y, xlab="Date", ylab="Count")

Warns "parameter "ylab" couldn't be set in high-level plot() function",
but generates the label as specified.
Without 'ylab="Count"' no warning message is issued.
#
possolo@crd.ge.com wrote:
Not really a bug. It's a warning message, not an error, and the result
is as expected. The underlying problem has been discussed (at least
mentioned) several times - and I don't know an _optimal_ solution.

The warning comes from axis.POSIXct(1, x, ...) within plot.POSIXct(),
because axis() doesn't understand "ylab" which is passed by the ...
argument.

Uwe Ligges