Re: Gnuplot is interpolating between missing data

Gabriel Dupras <[email protected]> Mon, 20 Sep 2021 19:05:08 -0400
Newsgroups gmane.comp.graphics.gnuplot.user
Message-ID <[email protected]>
Hello,

If you type "help missing" in an interactive gnuplot session, you'll see 
the following:

Gnuplot makes a distinction between missing data and
invalid data (e.g. "NaN", 1/0.).  For example invalid data causes a gap in a
line drawn through sequential data points; missing data does not.

So you should *not* set "x" as the string for missing data. Instead, try 
this:

$DATA << END
1 1
2 2
3 x
4 4
5 5
6 x
7 7
8 8
END

plot $DATA u 1:($2) w linespoints

You'll get a straight line with a two gaps.

I hope this helps.

Gabriel


Le 2021-09-20 à 18 h 45, Dave Horsfall a écrit :
> Anyone?
>
> -- Dave
>
> ---------- Forwarded message ----------
> Date: Tue, 31 Aug 2021 08:37:08 +1000 (EST)
> From: Dave Horsfall <[email protected]>
> To: Gnuplot Mailing List <[email protected]>
> Subject: Gnuplot is interpolating between missing data
>
> Gnuplot (on a Mac), 5.4p2
>
> I have some missing data which I indicate with "x" (set datafile 
> missing "x"), yet Gnuplot seems to be drawing a straight line between 
> the valid data. Shouldn't it be blank instead?
>
> -- Dave
>
>
> _______________________________________________
> gnuplot-info mailing list
> [email protected]
> Membership management via: 
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info


_______________________________________________
gnuplot-info mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info