title: Is there a way to add the last value of the data column to a legend
body: <p>I want to add the last value of a series to the plots legend. I tried different variants of this <a href="https://stackoverflow.com/a/37285338/1298461">SO</a> answer like so:</p>
  
  <pre><code>plot filename using 1:2:(last=$2) title sprintf("1/N %0.2f", last) with lines
  </code></pre>
  
  <p>But this puts <code>nan</code> into the label. And if I do <code>1:(last=$2)</code> this messes up the whole line.</p>
  
  <p>The problem is I need to make it platform independent meaning it needs to run on windows and linux. So I can not just tail and awk. Is there a build in way to achieve this?</p>