Beyond Code
There is more to Programming than programming...



Gnuplot in Action
Understanding Data with Graphs
396 Pages
Manning Publications (2009)
ISBN: 1933988398
ISBN-13: 978-1933988399
Buy from Manning Publications
Buy from


My contributions to the gnuplot code base:

  (Available in gnuplot version 4.3 and higher)

airy(x) :  The Airy function Ai(x)

The Airy function Ai(x) is the solution to the differential equation y'' - xy = 0 and is of particular importance when solving differential equations in WKB approximation.

smooth kdensity and smooth cumulative

The smooth kdensity algorithm calculates a Gaussian kernel density estimate for a data set. (The bandwidth of the smoothing kernel can be set through an optional parameter, otherwise the "Gaussian" default is used.) A kernel density estimate is a smooth curve similar to a histogram. (See figures on the left.)

The smooth cumulative algorithm calculates the empirical distribution function for a data set. (See figures on the right.)

In the figures below, the raw data set is shown as a jitter plot in red. A conventional histogram is shown in green. The kernel density estimate and the cumulative distribution function are shown as smooth curves.

Kernel Density Estimation Cumulative Distribution Function
dgrid3d gauss

Gnuplot's dgrid3d mode allows to create a smooth surface from a set of points. The points do not necessarily have to be on a regular grid (although they are in the example shown below).

The "classic" smoothing approximation ("qnorm mode") had some peculiarities. In particular it tended to overemphasize the neighbourhood of the data points. (See figures on the left.)

I added some other smoothing kernels to the existing dgrid3d infrastructure, of which the Gaussian kernel is probably the most versatile. It leads to overall smoother surfaces and allows for better control of the range of the smoothing kernel. (See figures on the right.)

qnorm Smoothing (old) Gaussian Kernel Smoothing (new)