[Rd] patch proposal for plot.ts

From: Antonio, Fabio Di Narzo <antonio.fabio_at_gmail.com>
Date: Sat, 24 Nov 2007 12:35:25 +0100

Hi all.
Currently, if you try:

> lag.plot(1:10)

you get superposed labels '1' and '10'. Things go worse in more extreme cases:

x <- ts(1:10)
x1 <- lag(x, 4)

plot(x1, x)

This is due to a mistake in plot.ts. My suggestion is the following really minimal patch to plot.ts:

@@ -530,7 +530,7 @@ plot.ts <-

                text(xy, labels =
                     if(is.character(xy.labels)) xy.labels
                     else if(all(tsp(x) == tsp(y))) formatC(time(x), width = 1)
-                    else seq_along(x),
+                    else seq_along(xy$x),
                     col = col, cex = cex)
                lines(xy, col = col, lty = lty, lwd = lwd,

Best regards,

Antonio, Fabio Di Narzo
Ph.D. student at
Department of Statistical Sciences
University of Bologna, Italy

______________________________________________ R-devel_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Received on Sat 24 Nov 2007 - 11:38:25 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 24 Nov 2007 - 17:30:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.