title: how to automatically sort the x values in gnuplot
body: <p>When I try to plot something with <code>linespoints</code>, unless the values that go to the <code>x</code> axis are already sorted within the file, each point gets connected to the point that is on the next line of the file:</p>
  
  <p><img src="https://i.stack.imgur.com/1IX9e.png" alt="enter image description here"></p>
  
  <p>Only when I sort the values in the file I can get the desired effect, which is that each point gets connected to the point with one smaller and one larger <code>x</code> value:</p>
  
  <p><img src="https://i.stack.imgur.com/2hgYW.png" alt="enter image description here"></p>
  
  <p>Is there a way to do this within gnuplot, without having to sort the files in bash?</p>