Histogram

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

Bases: NoNewAttributesAfterInit

Base class for histogram plots

Methods

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

Plot the data.

overplot

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: dict[str, Any] = {'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, xhi, 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.

yerroptional

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, xlabel, ylabeloptional, str

The optional plot title and axis labels. These are ignored if overplot is set to True.

overplotbool, optional

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

clearwindowbool, 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