Gnuplot is a great tool for scientific plotting and visualization. However, sometimes it is a bit esoteric and strange to work with.
If you want to plot a surface of regular three dimensional data points with gnuplot as a surface, you might get problems if the data is not equidistent and you do not want gnuplot to extrapolate a surface for you. The key to success is to order the data first by x, then by y and insert a newline after each block with the same y entry. The following first shows two incorrect tries and then the solution.
You might first try the following, yielding only some points.
You might first try the following, yielding a strangely grid which is interpolated equidistently. Note how this does not resemble our data set at all.
Then, with linespoint, you will get your points strangely interconnected:
And finally, we add blank lines between each y-block and get what we want.