plot_pdf

sherpa.astro.ui.plot_pdf(points: ArrayType, name: str = 'x', xlabel: str = 'x', bins: int = 12, normed: bool = True, replot: bool = False, overplot: bool = False, clearwindow: bool = True, **kwargs) → None

Plot the probability density function of an array of values.

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

Parameters:
pointsarray

The values used to create the probability density function.

namestr, optional

The label to use as part of the plot title.

xlabelstr, optional

The label for the X axis

binsint, optional

The number of bins to use to create the PDF.

normedbool, optional

Should the PDF be normalized (the default is True).

replotbool, optional

Set to True to use the values calculated by the last call to plot_pdf. The default is False.

overplotbool, optional

If True then add the data to an existing plot, otherwise create a new plot. The default is False.

clearwindowbool, optional

Should the existing plot area be cleared before creating this new plot (e.g. for multi-panel plots)?

See also

get_draws

Run the pyBLoCXS MCMC algorithm.

get_pdf_plot

Return the data used to plot the last PDF.

plot_cdf

Plot the cumulative density function of an array.

plot_scatter

Create a scatter plot.

Examples

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