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:
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
Last edit: Karl Ratzsch 2014-03-23
Diff:
I'm seeing this in 5.0.3
Doing the following:
produces
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.