- Description has changed:
Diff:
--- old +++ new @@ -13,9 +13,9 @@ gives === -# Curve 0 of 1, 3 points -# Curve title: "'-' using 1:(1)" -# x y type +\# Curve 0 of 1, 3 points +\# Curve title: "'-' using 1:(1)" +\# x y type 1 2 i 6 1 i 6 1 u
When the data for a plot with "smooth frequency" contains at least one value twice, then a table output contains one additional invalid last line.
This comes in while rendering the data monotonic, same happens for smoothing options unique, cumulative and cnormal. The problem is in the function cp_implode() in interpol.c:1311. The invalid point is created to separate data blocks and -sets.
A partial fix would be to not do this for the last block/set, but that condition is not known beforehand. If all points in a set are already unique, a blank line appears after it in the output, which is of course desireable.
set table plot '-' using 1:(1) smooth freq 1 2 1 1 6 2 2 4 e unset table
gives
# Curve 0 of 1, 9 points # Curve title: "'-' using 1:(1)" # x y type 1 1 i 2 1 i 1 2 i 6 1 i 6 1 u 2 2 i 4 1 i 2 1 u
Diff:
--- old +++ new @@ -13,9 +13,9 @@ gives === -# Curve 0 of 1, 3 points -# Curve title: "'-' using 1:(1)" -# x y type +\# Curve 0 of 1, 3 points +\# Curve title: "'-' using 1:(1)" +\# x y type 1 2 i 6 1 i 6 1 u
My description was very strange, and this should have been filed as a bug report.
P.S. Still the same in 4.6.5 (windows -rc2 build), so it seems unrelated to that bug with an invalid value after a blank line in the data file
I'm seeing this in 5.0.3
Doing the following:
$k << EOD 1 2 1 8 2 9 2 1 3 9 3 10 EOD set table plot $k u 1:2 smooth frequency
produces
# Curve 0 of 1, 4 points # Curve title: "$l u 1:2" # x y type 1 10 i 2 10 i 3 19 i 2 9 u
I have wanted to use this to capture the smoothing output into a named data block and plot that, coloring the result according to the smoothed value, but this extraneous line prevents that. It is possible to use the third column and test for a value not 'u', but this is annoying.