|
From: <pl...@pi...> - 2014-04-20 09:02:59
|
On 04/20/14 10:48, pl...@pi... wrote: > > HI, > > > I often use conditional using clauses to plot part of a range of data > > plot datafile using (($1<=1995.55)?$1:NaN):(2*fcos1($1)) > > I tried this when writing to a file specified with "set table" and > instead of cutting off the output, it appends garbage data with a "u". > > help table tells me this means "undefined" > > I see two problems here. I did not ask for undefined output , I > specified NaN. > > Secondly , what is the possible use of "undefined" values in a data file? > > 1995.46 1.00914 i > 1995.54 1.10947 i > 1.98547e-81 4.74363e+170 u > 3.75845e+174 7.52884e-24 u > 0 2.122e-314 u > 0 0 u > 0 0 u > 1.9771e+161 1.44402e+214 u > -1.22337e-44 1.1735e-319 u > 1.01887e+189 7.49746e+247 u > 5.35166e+199 2.10124e+88 u > > > From my using clause I would expect either > > NaN [ correct value of 2*fcos($1) ] o > NaN [ correct value of 2*fcos($1) ] i > > or preferable nothing at all , as would reflect the usual terminal > output for NaN points. > > Version 4.7 patchlevel 0 last modified 2012-10-16 > Build System: Linux i686 > > > > Thanks , Peter > I've just found out the if I used "NaN" as a string instead of NaN in the using clause I get the result I expected: the data cuts off at the required date. plot datafile using (($1<=1995.55)?$1:"NaN"):(2*fcos1($1)) It seems there is an inconsistency in the way this is being handled. Clearly I should not need two different versions of the plot command. Peter. |