|
From: hchiPer <hc...@gm...> - 2022-12-19 08:49:01
|
Instead of an 'x', use 'Nan' or '1/0' (without the quotes) for unavailable data. You will get a gap in the graphs. See gnuplot manual under the section "Set datafile missing" for more info. There is a gap only where a data is invalid (e.g. NaN or 1/0). When a data is missing, the line is drawn anyway. When gnuplot tries to compute the square root of the products, the result is indeed NaN when one of the values is the letter x, and this explains why there is a gap in your third line. Le 18/12/22 à 22:27, Dave Horsfall a écrit : > Gnuplot 5.4.3 on old MacBook Pro running High Sierra. > > I have many graphs which have missing data e.g. I was too lazy to record > it on that day etc; these are indicated with "x" in the data file. > > Now, hie thee to http://www.horsfall.org/bike.pdf which is a graph of the > progress (if any) that I am making on my exercise bike; the "brake" is the > friction adjustment and does not seem to be in any particular unit. > > For laughs I compute an overall "effort" value which is the product of the > distance and the brake (I was forced to rescale it by taking the square > root to both make it fit and to make it look better, but that's irrelevant > here). > > Notice how the recorded data is interpolated over the missing data, yet > the computed plot shows a gap (the desired behaviour). > > (I do not use `set datafile missing "x"' anywhere) > > Oddly enough my other graphs such as www.horsfall.org/health.pdf etc are > fine; the only difference is the linetype where I am using "lt rgb" and no > "pt", whereas with my exercise bike I am using a specific point type to be > compatible with both a colour inkjet and a mono laser. > > Is this expected behaviour? It looks like a bug to me... > > Attached are the relevant *.dat and *.gp files. > > Thanks. > > -- Dave > > > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |