[R] connect points in charts
PIKAL Petr
petr.pikal at precheza.cz
Fri Oct 26 14:21:42 CEST 2012
Hi
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Christof Kluß
> Sent: Friday, October 26, 2012 1:42 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] connect points in charts
>
> Hi
>
> is there a automatic way that long distances between points are not
> connected. I have something like
>
> plot(x,y,type="o",...)
>
> atx <- seq(as.Date("2009-04-01"),as.Date("2011-04-01"),"month")
>
> axis.Date(1, at=atx,labels=format(atx, "%b\n%Y"), padj=0.5 )
>
> but I do not want lines between points whose distance is greater than
> two weeks.
You can discard a line by entering NA between dates.
plot(1:10, 1:10, type="o")
plot(c(1:5,NA,7:10), 1:10, type="o")
So you shall construct new data in which you put NA on propper places.
Regards
Petr
>
> thx
> Christof
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list