Skip to content
Prev 31877 / 398506 Next

lines(aline, type = 'b', col = "blue) does not work for POSIXct plot.

On Sun, 11 May 2003, John Jaynes wrote:

            
What do you expect lines(aline) to do?  As the help page says

Arguments:

    x, y: coordinate vectors of points to join.

and you seem to have ignored the need to specify `x'!  If you had, it
would have worked.

lines(x, aline, type = "b", col = "blue")  # works as documented

You can hardly expect a book to tell you that you have failed to RTFM, but
several would not have led you to believe (incorrectly) that
BTW, 1:30 and 30:1 are in R for a purpose and would make your example both
easier to understand and easier to reproduce (since you didn't wrap your
lines either: that's a piece of netiquette to bear in mind).

BDR