SkyHeatmap

class gdt.core.plot.plot.SkyHeatmap(x, y, heatmap, ax, flipped=True, frame='equatorial', color=<GdtCmap: RdPu;           alpha_min=0.00;           alpha_max=1.00;           alpha_scale=linear>, alpha=None, norm=None, **kwargs)[source]

Bases: PlotElement

Plot a heatmap on the sky. By default, the heatmap opacity will scale from 0 (fully transparent) to 1 (fully opaque) corresponding to the colormap value, creating an alpha gradient. This behavior can be adjust by setting alpha_min and alpha_max.

Parameters:
  • x (np.array) – The azimuthal coordinate array of the heatmap grid

  • y (np.array) – The polar coordinate array of the heatmap grid

  • heatmap (np.array) – The heatmap array, of shape (x.size, y.size)

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

  • color (str, optional) – The colormap of the heatmap. Default is ‘RdPu’

  • alpha_min (float, optional) – The alpha opacity for the minimum color value. Default is 0.

  • alpha_max (float, optional) – The alpha opacity for the maximum color value. Default is 1.

  • norm (matplotlib.colors.Normalize or similar, optional) – The normalization used to scale the colormapping to the heatmap values. This can be initialized by the defined matplotlib normalizations or a custom normalization.

  • flipped (bool, optional) – If True, the azimuthal axis is flipped, following equatorial convention

  • frame (str, optional) – Either ‘equatorial’, ‘galactic’, ‘spacecraft’. Default is ‘equatorial’

  • **kwargs – Other plotting options

Attributes Summary

alpha

The alpha opacity value, between 0 and 1.

artists

The object references to the individual matplotlib elements

color

The colormap

norm

matplotlib.colors.Normalize or similar): The colormap normalization

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, between 0 and 1.

Type:

(float)

artists

The object references to the individual matplotlib elements

Type:

(list)

color

The colormap

Type:

(GdtCmap)

norm

matplotlib.colors.Normalize or similar): The colormap normalization

Type:

(

Type:

class

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