plot_pdf¶
-
sherpa.ui.
plot_pdf
(points, name='x', xlabel='x', bins=12, normed=True, replot=False, overplot=False, clearwindow=True)¶ Plot the probability density function of an array of values.
Create and plot the probability density function (PDF) of the input array.
Parameters: - 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 isFalse
. - overplot (bool, optional) – If
True
then add the data to an exsiting plot, otherwise create a new plot. The default isFalse
. - clearwindow (bool, optional) – When using ChIPS for plotting, should the existing frame be cleared before creating the plot?
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")