SpectrumBackground

class gdt.core.plot.plot.SpectrumBackground(backspec, ax, color=None, alpha=None, band_alpha=None, **kwargs)[source]

Bases: PlotElement

Plot a count spectrum background model with an error band.

Parameters:
  • backspec (BackgroundSpectrum) – The background sepctrum object integrated over time

  • ax (matplotlib.axes) – The axis on which to plot

  • cent_alpha (float, optional) – The alpha of the background centroid line. Default is 1

  • cent_color (str, optional) – The color of the background centroid line

  • err_alpha (float, optional) – The alpha of the background uncertainty. Default is 1

  • err_color (str, optional) – The color of the background uncertainty

  • color (str, optional) – The color of the background. If set, overrides cent_color and err_color.

  • alpha (float, optional) – The alpha of the background. If set, overrides cent_alpha and err_alpha

  • **kwargs – Other plotting options

Attributes Summary

alpha

The alpha opacity value

artists

The object references to the individual matplotlib elements

band_alpha

The opacity of the uncertainty band

color

The color of the plot element

linestyle

The linestyle of the background Default is '-'

linewidth

The line width of the background.

visible

True if the element is shown on the plot, False otherwise

zorder

The plot element zorder

Methods Summary

hide()

Hide the plot element

remove()

Remove the plot element

show()

Show the plot element

toggle()

Toggle the visibility of the plot element

Attributes Documentation

alpha

The alpha opacity value

Type:

(float)

artists

The object references to the individual matplotlib elements

Type:

(list)

band_alpha

The opacity of the uncertainty band

Type:

(float)

color

The color of the plot element

Type:

(str)

linestyle

The linestyle of the background Default is ‘-’

Type:

(str)

linewidth

The line width of the background. Default is 1.5

Type:

(int)

visible

True if the element is shown on the plot, False otherwise

Type:

(bool)

zorder

The plot element zorder

Type:

(int)

Methods Documentation

hide()

Hide the plot element

remove()

Remove the plot element

show()

Show the plot element

toggle()

Toggle the visibility of the plot element