Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
gnuplot给了我奇怪的情节_Gnuplot_Distribution - Fatal编程技术网

gnuplot给了我奇怪的情节

gnuplot给了我奇怪的情节,gnuplot,distribution,Gnuplot,Distribution,我无法描述情节是怎样的,所以我只使用了“奇怪”,因为我不知道为什么gnuplot会给我这样一个情节。这是我正在努力做的事情 我有一个包含两列的数据文件,第一列是文件名,第二列是每个文件的大小。每列超过200万行。我只想画出文件大小的分布。这是我的密码 set terminal postscript landscape enhanced mono dashed lw 2 "Times" 18 outputfile = "sizedist.ps" set output outputfile bin

我无法描述情节是怎样的,所以我只使用了“奇怪”,因为我不知道为什么gnuplot会给我这样一个情节。这是我正在努力做的事情

我有一个包含两列的数据文件,第一列是文件名,第二列是每个文件的大小。每列超过200万行。我只想画出文件大小的分布。这是我的密码

set terminal postscript landscape enhanced mono dashed lw 2 "Times" 18
outputfile = "sizedist.ps"
set output outputfile

binwidth = 0.05
bin(x,width)=width*floor(x/width)
plot [0:3.5][]'sizedist.out' using (bin(log10($2/1024),binwidth)):(1.0) smooth freq with boxes t "Binsize=0.05 dex"

set terminal x11
理想情况下,它应该是一个单一的高斯样条形图,但它有许多其他的图叠加(见我的附件)。任何关于gnuplot的专家都知道为什么会发生这种情况?

如果频率图中的某些数据没有明确定义的值(如NaN、inf等),则会发生这种情况


由于在绘图中使用的是对数函数,因此必须小心使用具有值的数据!回答得好!这正是问题所在!非常感谢你!
plot [0:3.5][]'sizedist.out' using ($2>0?bin(log10($2/1024),binwidth):0):(1.0) smooth freq with boxes t "Binsize=0.05 dex"