When I try to plot something with linespoints, unless the values that go to the x axis are already sorted within the file, each point gets connected to the point that is on the next line of the file:

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 x value:

Is there a way to do this within gnuplot, without having to sort the files in bash?