How to output smooth cspline curve as a data file

前端 未结 2 1322
长情又很酷
长情又很酷 2021-01-11 15:10

Does anybody know how to extract some data of smooth cspline curve for a given data?

For instance, there is a data file which has 2 columns corresponding to x and y

2条回答
  •  死守一世寂寞
    2021-01-11 15:57

    Use set table 'temp.dat' to redirect the plotted data points to an external file

    set table 'temp.dat'
    plot 'myfile.dat' using 1:2 smooth cspline
    unset table
    

    To test it

    plot 'myfile.dat' using 1:2 with points title 'original points',\
         'temp.dat' using 1:2 with lines title 'smoothed curve'
    

提交回复
热议问题