\cat software
data.txt contains x, y, z, and value pairs.
splot "data.txt" using 1:2:3:4 palette
l(x) = y0 + m*x y0 = 0.0 m = 0.0 fit l(x) 'lcdemo.dat' via y0, m plot 'lcdemo.dat', l(x)
plot 'hemisphr.dat' u (floor($1*20)):(1) smooth frequency with histeps plot 'one_column_data' using 1:(1) smooth frequency with histeps plot 'one_column_data' using (floor($1*100000.0)/100000.0):(1) smooth frequency with histeps
Suppose a data file is as follows:
# first set 1 2 2 3 3 4 # here two blank lines # second set 11 22 22 33 33 44
Then I can plot the two data sets separately:
plot "data.txt" index 0, "data.txt" index 1
f(x) = a*x**3 + b*x**2 + ... # define a fitting function a = 0.0 b = 0.0 ... # set variables fit f(x) 'data.txt' via a, b, ... # fit it! plot f(x), 'data.txt' # check the result