sherpa.ui.plot_pdf(points, name='x', xlabel='x', bins=12, normed=True, replot=False, overplot=False, clearwindow=True, **kwargs)

Plot the probability density function of an array of values.

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

  • points (array) – The values used to create the probability density function.

  • name (str, optional) – The label to use as part of the plot title.

  • xlabel (str, optional) – The label for the X axis

  • bins (int, optional) – The number of bins to use to create the PDF.

  • normed (bool, optional) – Should the PDF be normalized (the default is True).

  • replot (bool, optional) – Set to True to use the values calculated by the last call to plot_pdf. The default is False.

  • overplot (bool, optional) – If True then add the data to an existing plot, otherwise create a new plot. The default is False.

  • clearwindow (bool, optional) – Should the existing plot area be cleared before creating this new plot (e.g. for multi-panel plots)?

See also


Run the pyBLoCXS MCMC algorithm.


Return the data used to plot the last PDF.


Plot the cumulative density function of an array.


Create a scatter plot.


>>> 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")