I'm plotting a histogram with the commands:
n=3
max=0.5
min=-2.5
width=(max-min)/n
hist(x,width)=width*floor(x/width)+width/2.0
plot "< awk '{if (\$1<3.9 && \$1>3.8) {print \$0}}' /path_to_file/" u (hist(\$2,width)):(1.0) smooth freq w boxes lc rgb "black" lt 1 lw 0.5 notitle
which gets me this:
Apparently, I'm guessing based on the data file, gnuplot
is deciding by itself to choose the intervals [1.0:0.0]-[0.0:-1.0]-[-1.0:-2.0] which makes the bins centered in [0.5:-0.5:-1.5]
I need those bins to use the intervals [0.5:-0.5]-[-0.5:-1.5]-[-1.5:-2.5] which would make the bins centered in [0.0:-1.0:-2.0]
How can I accomplish this?