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?
gnuplotto actually use those intervals I wrote and not the ones it appears to be using by its own decision. How can I tellgnuplotfrom what position to start counting to generate the intervals with the width I set? - Gabrielx -> x-0.5? Try:hist(x,width)=width*floor((x-0.5)/width)+width/2.0- mgilsongnuplotto center the bins around 0.0, -1.0 and -2.0 (with a width of '1') instead of how they are centered by default which is in 0.5, -0.5 and -1.5. I wantgnuplotto count the number of objects inside each interval [0.5:-0.5]-[-0.5:-1.5]-[-1.5:-2.5] and not what it is doing right now which is counting them in the intervals [1.0:0.0]-[0.0:-1.0]-[-1.0:-2.0]. - Gabriel