在gnuplot中堆叠自动装箱的直方图

时间:2015-11-23 13:19:16

标签: gnuplot histogram binning

ways to have gnuplot bin your data for you围绕

binwidth=5
bin(x,width)=width*floor(x/width)

plot 'datafile' using (bin($1,binwidth)):(1.0) smooth freq with boxes

还有ways to plot stacked histograms from pre-binned data,使用

set style data histogram
set style histogram rowstacked

plot 'test.dat' using 2:xtic(1) title 'Col1', '' using 3 title 'Col2'

有没有办法让两全其美?我可以

plot 'a.dat' using (bin($1,binwidth)):(1.0) smooth freq with boxes lc 'red' ,\
     'b.dat' using (bin($1,binwidth)):(1.0) smooth freq with boxes lc 'blue' 

但如果我set style fill solid第一个情节被抽出。

0 个答案:

没有答案