Re: [R] plotting lines that break if data break

From: Denis Chabot <>
Date: Wed 08 Feb 2006 - 14:33:50 EST

I'm sorry, too long without coffee.

Lately I have done numerous plots with superimposed non-linear quantile regression fits, and those do not break (which is fine), and I wrongly transposed this to "lines" in my head.

Le 06-02-07 à 22:06, Gabor Grothendieck a écrit :

> It does break already. Try this:
> plot(1:10, c(1:5,NA,7:10), type = "l")
> plot(c(1:5,NA,7:10), 1:10, type = "l")
> On 2/7/06, Denis Chabot <> wrote:
>> Hi,
>> Sometimes data series (not necessarily time series) suffer breaks
>> where data were expected, but not collected. Often the regular
>> "lines" command to add such data to a plot is what I want, but other
>> times I'd like the line to break where the data series is
>> interrupted, instead of the line jumping to the next point in the
>> series uninterrupted. Usually my data file contain one value of x but
>> none of y, but alternatively a break could also appear as a NA value
>> for both x and y.
>> I have found I could use the "segments" command instead of "lines",
>> but this seems to require I manipulate my data (which may or may not
>> contain breaks, and the number of breaks can vary if there are breaks
>> at all).
>> Is there another command that works like "lines" but will break the
>> line if the data series suffer an interruption?
>> Sincerely,
>> Denis Chabot
>> ______________________________________________
>> mailing list
>> PLEASE do read the posting guide!
>> guide.html
>> mailing list PLEASE do read the posting guide! Received on Wed Feb 08 14:43:19 2006

This archive was generated by hypermail 2.1.8 : Fri 10 Feb 2006 - 19:39:05 EST