X-Received: by 10.107.17.137 with SMTP id 9mr738851ior.106.1520621290302; Fri, 09 Mar 2018 10:48:10 -0800 (PST) X-Received: by 10.157.68.105 with SMTP id f38mr1570709otj.1.1520621290227; Fri, 09 Mar 2018 10:48:10 -0800 (PST) Path: csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!r195no381755itc.0!news-out.google.com!a2-v6ni1072ite.0!nntp.google.com!e10-v6no381194itf.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.graphics.apps.gnuplot Date: Fri, 9 Mar 2018 10:48:09 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=198.180.133.100; posting-account=WO9xuAoAAACcTNJy3OoKjwl95JzG1-AA NNTP-Posting-Host: 198.180.133.100 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <52fd232c-59cd-44b7-bbb3-5b4c52d4bd76@googlegroups.com> Subject: Re: Missing points in multi line plot not being omitted From: Marius Schamschula Injection-Date: Fri, 09 Mar 2018 18:48:10 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Lines: 76 Xref: csiph.com comp.graphics.apps.gnuplot:3908 On Wednesday, March 7, 2018 at 12:34:00 PM UTC-6, Marius Schamschula wrote: > I'm trying to make a plot of wind speed and wind gusts. The data for wind= gusts is not continuous. If I use datafile missing on the wind gust data b= y itself, things work as expectedly, but if I try to plot gusts along with = wind speed, gusts data are shown for times where there is no data. The plot= omits gusts data at the beginning and end, but in the middle line segments= are drawn where they should not. For example >=20 > set datafile missing NaN > set grid > set time > set xdata time > set timefmt "%Y-%m-%d:%H:%M:%S" > unset timestamp > plot '-' u 1:2 t 'Wind' w lines lt rgb "blue", '-' u 1:3 t 'Gust' w lines > 2018-03-07:12:53:00 12 18 > 2018-03-07:11:53:00 12 ? > 2018-03-07:10:53:00 12 23 > 2018-03-07:09:53:00 20 28 > 2018-03-07:08:53:00 17 ? > 2018-03-07:07:53:00 13 23 > 2018-03-07:06:53:00 15 28 > 2018-03-07:05:53:00 15 29 > 2018-03-07:04:53:00 17 26 > 2018-03-07:02:53:00 9 ? > 2018-03-07:01:53:00 12 ? > 2018-03-07:00:53:00 16 ? > 2018-03-06:23:53:00 16 24 > 2018-03-06:22:53:00 16 29 > 2018-03-06:21:53:00 13 22 > 2018-03-06:20:53:00 15 22 > 2018-03-06:19:53:00 14 21 > 2018-03-06:18:53:00 13 20 > 2018-03-06:17:53:00 10 17 > 2018-03-06:16:53:00 10 ? > 2018-03-06:15:53:00 7 ? > 2018-03-06:14:53:00 12 ? > 2018-03-06:13:53:00 12 ? > e > 2018-03-07:12:53:00 12 18 > 2018-03-07:11:53:00 12 ? > 2018-03-07:10:53:00 12 23 > 2018-03-07:09:53:00 20 28 > 2018-03-07:08:53:00 17 ? > 2018-03-07:07:53:00 13 23 > 2018-03-07:06:53:00 15 28 > 2018-03-07:05:53:00 15 29 > 2018-03-07:04:53:00 17 26 > 2018-03-07:02:53:00 9 ? > 2018-03-07:01:53:00 12 ? > 2018-03-07:00:53:00 16 ? > 2018-03-06:23:53:00 16 24 > 2018-03-06:22:53:00 16 29 > 2018-03-06:21:53:00 13 22 > 2018-03-06:20:53:00 15 22 > 2018-03-06:19:53:00 14 21 > 2018-03-06:18:53:00 13 20 > 2018-03-06:17:53:00 10 17 > 2018-03-06:16:53:00 10 ? > 2018-03-06:15:53:00 7 ? > 2018-03-06:14:53:00 12 ? > 2018-03-06:13:53:00 12 ? > e >=20 > The data is normally read from a temporary file, with additional formatti= ng applied. A full example is >=20 > http://wx.aamu.edu/Images/mkpng.php?cws+KHSV >=20 > This is generated real time, so sometimes there isn't any wind gust data,= or there are gusts over the whole time period. FYI, I'm using version 5.2 patchlevel 2 under FreeBSD, so indeed there shou= ld not be any quotes around the NaN Dealing with single points is easy: add a marker. My problem is having line= s where they shouldn't be.