|
From: Philipp K. J. <ja...@ie...> - 2008-05-23 23:15:36
|
I just submitted a patch (1970923) which draws a smooth histogram-like curve for a random collection of points, using a Gaussian kernel density estimation algorithm. Demos are found here: www.philipp-janert.com/kdensity The new method has the following advantages over the classic way of generating histograms using "smooth frequency": - the resulting histogram is a smooth curve, making the effect of binning less severe - it handles intermediate "bins" with no points in them gracefully. (smooth freq does so only if used "with boxes", but if you use "with lines" for example, the line will not drop to zero if an intermediate bin is empty) The method is invoked like a weighted smoothing algorithm: plot "data" u 1:(1):(1) smooth kdensity where the 2nd parameter is the weight of each point and the 3rd parameter is the bandwidth to be used. This patch complements the "smooth cumulative" algorithm as another way to visualize the distribution of a collection of random points. Comments and suggestions are welcome. Best, Ph. |