density.uniform Function (GPL)

Syntax

density.uniform(<algebra>, min(<numeric>), max(<numeric>), <function>)

or

density.uniform(<binning function>, min(<numeric>), max(<numeric>), <function>)

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

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

<numeric>. min and max define the parameters for the distribution. These take numeric values. You can use all of them or none of them. Any missing parameters are 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 uniform distribution using the method-of-moments estimate. This is often used to add a distribution curve.

Examples

Figure 1. Example: Adding a uniform distribution curve
ELEMENT: line(position(density.uniform(x)))