#694 Add options to set table command

Version 5

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.

1 Attachments


  • Karl Ratzsch
    Karl Ratzsch

    With the new plot style "table", you can already define arbitrary columns to be written to the file, without the "i"/"o" mark.

    set table;set samp 10
    plot "+" using 1:(sin($1)):(0.1):(sin($1)*0.2) with table

    What is missing is an option to selectively suppress points that are invalid (NaN) and/or outside the current yrange.

    Last edit: Karl Ratzsch 2014-06-24
  • Karl Ratzsch
    Karl Ratzsch

    This could be done by adding an option "suppress" to "with table". It would then evaluate an additional "using" entry. E.g.

    plot dataf using 1:(f($1)):($2==NaN ? NaN : $1==0 ? -1 : 1) with table suppress

    If the third column evaluates to NaN (or zero?), the line would not be printed at all, one prints it.

    Additionally, minus one could cause an empty line to be printed instead, minus 2 for two empy lines.