ARFPlot

class sherpa.astro.plot.ARFPlot[source] [edit on github]

Bases: HistogramPlot

Create plots of the ancillary response file (ARF).

xlo, xhi

The lower and upper edges of each bin.

Type:

array_like

y

The effective area (ARF) value for the bin.

Type:

array_like

xlabel, ylabel, title

Plot labels.

Type:

str

Attributes Summary

histo_prefs

The preferences for the plot.

x

Return (xlo + xhi) / 2

Methods Summary

hline(y[, xmin, xmax, linecolor, linestyle, ...])

Draw a line at constant y, extending over the plot.

overplot(*args, **kwargs)

plot([overplot, clearwindow])

Plot the data.

prepare(arf[, data])

Fill the fields given the ARF.

vline(x[, ymin, ymax, linecolor, linestyle, ...])

Draw a line at constant x, extending over the plot.

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.

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

static hline(y, xmin=0, xmax=1, linecolor=None, linestyle=None, linewidth=None, overplot=False, clearwindow=True) [edit on github]

Draw a line at constant y, extending over the plot.

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(arf, data=None)[source] [edit on github]

Fill the fields given the ARF.

Parameters:
  • arf – The ARF to plot

  • data (DataPHA instance, optional) – The units attribute of this object is used to determine whether the X axis should be in Angstrom instead of KeV (the default). If the units setting is “channel” then the X axis is shown using keV.

static vline(x, ymin=0, ymax=1, linecolor=None, linestyle=None, linewidth=None, overplot=False, clearwindow=True) [edit on github]

Draw a line at constant x, extending over the plot.