|
From: <br...@ph...> - 2006-06-12 18:17:27
|
solled wrote: > Hi, > I am new to gnuplot. I need to make a histogram of some data I have. How do > I do this? Depends on what you mean by "make a histogram". There are two rather distinct things people refer two by this phrase: binning & counting data into a histogram dataset, and displaying such a dataset as a plot. gnuplot, by its nature, is really only meant to do the second part. Following the old Unix dogma of "one tool <--> one task", binning and counting is not gnuplot's job. But it does offer rudimentary support for it, as of version 4.0: bin(x,width) = width * floor(x / width) plot 'data' using (bin($1,5):(1.0) smooth frequency with histeps |