create a smooth surface using x,y,z data gnuplot

Solution 1:

Basically, you plot surfaces with the splot command. data_file contains your example data points.

gnuplot> splot 'data_file'

enter image description here

As you want a smooth surface, you have to specify that you want gnuplot to interpolate the data. Here is an example, see http://www.gnuplot.info/demo/dgrid3d.html for some others.

gnuplot> set hidden3d
gnuplot> set dgrid3d 50,50 qnorm 2
gnuplot> splot 'data_file' with lines

enter image description here

There are a lot of parameters you can adjust, e.g. what interpolation function is used. As it is very hard to cover all here in a general answer, I want to recommend to start with the documentation about splot and set dgrid3d.