This patch draws a smooth histogram-like curve
for a random collection of points, using
a Gaussian kernel density estimation algorithm.
Demos are found here (for the time being):
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.
Logged In: YES
user_id=1930341
Originator: YES
Applied and closed. 26 Jun 08.