Using gnuplot for discrete distribution -


is there relatively simple way plot graph of distribution of discrete data?

e.g. have set of float values on range 0 1 , need chart diagram on 10 ranges ([0.0, 0.1], [0.1, 0.2], ..., [0.9, 1.0]) of how many of given floats hit respective range.

thanks.

this can done "frequency plot". if frequency option set "all points same x-value replaced single point having summed y-values" (help smooth frequency). means if assign every point y-value 1 result number of points having particular x-value.

now, in order able sum points within range can use function rounds off values of data as suggested here

bin(x)=0.1*floor(x/0.1) plot "datafile.txt" using (bin($1)):(1.0) smooth frequency boxes 

you might want tweak appearance of boxes set boxwidth , set style fill.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -