Histogram

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

Bases: NoNewAttributesAfterInit

Base class for histogram plots

Attributes Summary

histo_prefs

The preferences for the plot.

Methods Summary

overplot(*args, **kwargs)

plot(xlo, xhi, y[, yerr, title, xlabel, ...])

Plot the data.

Attributes Documentation

histo_prefs = {'alpha': None, 'capsize': None, 'color': None, 'ecolor': None, 'label': None, 'linestyle': 'solid', 'linewidth': None, 'marker': 'None', 'markerfacecolor': None, 'markersize': None, 'xerrorbars': False, 'xlog': False, 'yerrorbars': False, 'ylog': False}

The preferences for the plot.

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:
  • 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.

  • xhi – 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.

  • y – 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.

  • title (optional, string) – The optional plot title and axis labels. These are ignored if overplot is set to True.

  • xlabel (optional, string) – The optional plot title and axis labels. These are ignored if overplot is set to True.

  • ylabel (optional, string) – 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 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

overplot