Histogram

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

Bases: sherpa.utils.NoNewAttributesAfterInit

Base class for histogram plots

Attributes Summary

histo_prefs

Methods Summary

overplot(*args, **kwargs)
plot(xlo, xhi, y[, yerr, title, xlabel, …]) Plot the data.

Attributes Documentation

histo_prefs = {}

Methods Documentation

overplot(*args, **kwargs)[source] [edit on github]
plot(xlo, xhi, y, yerr=None, title=None, xlabel=None, ylabel=None, overplot=False, clearwindow=True, **kwargs)[source] [edit on github]

Plot the data.

Parameters:
  • xhi, y (xlo,) – The data values to plot (the bin edges along the X axis and the bin values for the Y axis). They should have the same length.
  • yerr (optional) – The symmetric errors to apply to the y values, or None for no errors along the axis. If given, they should match the length of the data.
  • xlabel, ylabel (title,) – The optional plot title and axis labels. These are ignored if overplot is set to True.
  • overplot (bool, optional) – If True then add the data to an exsiting 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

overplot()