Index . 블로그창고 . Any comments?

\cat software

Multi-colored points
Curve fitting
Steps
Multiple data sets in a single file
Fitting

Multi-colored points

data.txt contains x, y, z, and value pairs.

splot "data.txt" using 1:2:3:4 palette

Curve fitting

l(x) = y0 + m*x
y0 = 0.0
m = 0.0
fit l(x) 'lcdemo.dat' via y0, m
plot 'lcdemo.dat', l(x)

Steps

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

Multiple data sets in a single file

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

Fitting

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

All the works in this site except software and copyrighted materials by others (e.g., 문학) are licensed under a Creative Commons License. 소프트웨어 및 문학과 같이 다른 이에게 저작권이 있는 작품을 제외하고 모두 크리에이티브 커먼즈 라이센스를 따른다.
Tue Oct 13 15:17:05 2020 . XHTML . CSS (lightbox.css is not part of Uniqki. ;-) . Powered by Uniqki!
refresh . edit . loginout . index