The attached patch adds two options to the set table command.
The first option 'clip' removes the last text column with the point type and only writes the points into the table that fall inside the active range.
The second option 'symerr' replaces the error bands ("y ylow yhigh") with a single value ("y yerr") specifying the errorbar, e.g. "10 9.5 10.5" becomes "10 0.5".
Both options are useful when the set table command is used together with a more advanced plot command (e.g. smooth freq) and the resulting table is used afterwards to fit a function to this data.