Menu

#75 Add a 'last' keyword to indicate last data set

None
closed-out-of-date
nobody
None
5
2020-12-25
2004-07-21
No

I suggest to add a keyword 'last' (or 'end') to
indicate the last data set in a datafile. For example,
when number of data sets in a file can vary but I want
to plot only first and last sets:

plot 'file' index 0, 'file' index last

May be such keyword can be useful in 'every' and
'using' constructions. In 'using' construction it will
define a last column:

plot 'file' using 1:last

or plot 'file' using 1:end
or plot 'file' using $1:$last
or plot 'file' using 1:column(last)

In 'every' construction it can indicate end_point and
end_block.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I think "-1" instead of "last" may be better:

    plot "file" index 0, "" index -1

    because this approach can easily be extended to
    last but one, last but two, and so on:

    plot "file" index 0, "" index -2 # last but one

    Ryo

     
  • Ethan Merritt

    Ethan Merritt - 2020-12-25
    • status: open --> closed-out-of-date
    • Group: -->
     
  • Ethan Merritt

    Ethan Merritt - 2020-12-25

    2020 review

    See Request 274

     

Log in to post a comment.