There are ways to have gnuplot bin your data for you which revolve around
binwidth=5
bin(x,width)=width*floor(x/width)
plot 'datafile' using (bin($1,binwidth)):(1.0) smooth freq with boxes
And there are ways to plot stacked histograms from pre-binned data, using
set style data histogram
set style histogram rowstacked
plot 'test.dat' using 2:xtic(1) title 'Col1', '' using 3 title 'Col2'
Is there a way to get the best of both worlds? I can
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'
but if I set style fill solid
the first plot is drawn over.