PDFPlot

class sherpa.plot.PDFPlot[source] [edit on github]

Bases: HistogramPlot

Display the probability density of an array.

See also

CDFPlot

Attributes Summary

histo_prefs

x

Return (xlo + xhi) / 2

Methods Summary

overplot(*args, **kwargs)

plot([overplot, clearwindow])

Plot the data.

prepare(points[, bins, normed, xlabel, name])

Create the data to plot.

Attributes Documentation

histo_prefs = {}
x

Return (xlo + xhi) / 2

This is intended to make it easier to swap between plot- and histogram-style plots by providing access to an X value.

Methods Documentation

overplot(*args, **kwargs) [edit on github]
plot(overplot=False, clearwindow=True, **kwargs) [edit on github]

Plot the data.

This will plot the data sent to the prepare method.

Parameters:
  • overplot (bool, optional) – If True then add the data to an existing plot, otherwise create a new plot.

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

  • **kwargs – These values are passed on to the plot backend, and must match the names of the keys of the object’s plot_prefs dictionary.

See also

prepare, overplot

prepare(points, bins=12, normed=True, xlabel='x', name='x')[source] [edit on github]

Create the data to plot.

Parameters:
  • points – The values to display.

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

  • normed (bool, optional) – See the description of the density parameter in the numpy.histogram routine.

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

  • name (optional, string) – Used to create the plot title.

See also

plot