GNUPLOT: saving data from smooth cumulative

冷暖自知 提交于 2019-12-03 08:45:31

You can save the data after applying smooth with set table .... In the simplest case, if you need only the cumulative data, just use:

set table 'random1-smoothed.dat'
plot 'random1.dat' using (bin($1,width)):(1.0) smooth cumulative
unset table

For better inclusion in your script you could also wrap the whole, existing plot command in set table:

...
set table 'random1-smoothed.dat'
plot 'random1.dat' using (bin($1,width)):(1.0) smooth frequency with boxes title 'histogram',\
'' using (bin($1,width)):(1.0) smooth cumulative axis x1y2 w l lt 2 lw 2 lc rgb 'green' title 'cumul'
unset table

set terminal pngcairo size 800,500 enhanced font 'Verdana,14'
set output "testCum.png"
replot
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!