Displaying 2 results from an estimated 2 matches for "ylabproblem".
2003 Apr 28
1
ylab in time series plot (PR#2869)
...ing 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.
Here is a function that illustrates the problem.
ylabProblem <- function() {
x <- ISOdate(2003, 4, 1:10) # POSIXct vector
y <- rnorm(10)
plot(x, y, ylab = 'I am y')
}
and this is what I get when I run it.
> ylabProblem()
Warning message:
parameter "ylab" couldn't be set in high-level plot() f...
2003 Apr 30
2
ylab in plot.POSIXct
...tes.
What is the best way to do this?
It almost works to just call `plot.' However if I do this while using
the `ylab' parameter I get a warning message:
parameter "ylab" couldn't be set in high-level plot() function
Here is a function that demonstrates the behavior.
ylabProblem <- function() {
x <- ISOdate(2003, 4, 1:10) # POSIXct vector
y <- rnorm(10)
plot(x, y, ylab = 'I am y')
}
It works to invoke the low-level plotting routines by hand as follows:
ylabNoProblem <- function() {
x <- ISOdate(2003, 4, 1:10)...