    Plot the probability density function of an array of values.

plot_pdf(points, name='x', xlabel='x', bins=12, normed=True, replot=False, overplot=False, clearwindow=True, **kwargs)
points - array
name - str, optional
xlabel - str, optional
bins - int, optional
normed - bool, optional
replot - bool, optional
overplot - bool, optional
clearwindow - bool, optional

Create and plot the probability density function (PDF) of the input array.

>>> mu, sigma, n = 100, 15, 500 >>> x = np.random.normal(loc=mu, scale=sigma, size=n) >>> plot_pdf(x, bins=25)
>>> plot_pdf(x, normed=False, xlabel="mu", name="Simulations")

PARAMETERS

The parameters for this function are:

Parameter
Definition
points
The values used to create the probability density function.
name
The label to use as part of the plot title.
xlabel
The label for the X axis
bins
The number of bins to use to create the PDF.
normed
Should the PDF be normalized (the default is True ).
replot
Set to True to use the values calculated by the last call to `plot_pdf` . The default is False .
overplot
If True then add the data to an existing plot, otherwise create a new plot. The default is False .
clearwindow
Should the existing plot area be cleared before creating this new plot (e.g. for multi-panel plots)?

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2023