On Sep 24, 6:32 pm, mcastel <m.castell...@[EMAIL PROTECTED]
> wrote:
> Hello,
>
> I have a casual distribution of real number between two values (say
> zero and one) and I would like to create an histogram, in which I can
> have (say) ten bins, first one counting the number of points between 0
> and 0.1, the second counting points between 0.1 and 0.2, and so on.
it's quite easy with gnuplot but don't pretend much more...
you define two functions like this:
binit(binmin,bin,x) = binmin+bin*(0.5+int((x-binmin)/bin))
isinside(binmin,x,binmax)=x<binmin|x>binmax? 0:1
the you plot like this
plot 'data' using (binit(0.0,0.1,$1)):(isinside(0.0,$1,1.0)) smooth
frequency with step
it's a bit tricky to understand... I admit the key is to use the
"smooth frequency" key
from "help frequency"
The `frequency` option makes the data monotonic in x; points with the
same
x-value are replaced by a single point having the summed y-values.
The
resulting points are then connected by straight line segments.
Tommaso


|