density.poisson Function (GPL)

Syntax

density.poisson(<algebra>, rate(<numeric>), <function>)

or

density.poisson(<binning function>, rate(<numeric>), <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra is optional.

<binning function>. A binning function. The binning function is optional.

<numeric>. rate defines the parameter for the distribution. This takes a positive numeric value and is optional. If the parameter is not specified, it is calculated from the underlying data.

<function>. A valid function. Use scaledToData("false") when comparing densities with very different same sizes.

Description

Calculates the probability density of the Poisson distribution. This is often used to add a distribution curve. If you don't see the graphic element for the distribution, check the parameter for the distribution and the range for the x axis scale.

Examples

Figure 1. Example: Adding a Poisson distribution curve
ELEMENT: line(position(density.poisson(x, rate(5.5))))