### Navigation

- index
- modules |
- modules |
- next |
- previous |
- homepage|
- search|
- documentation »
- plot - Plot, various specialized plotting functions and associated utilities »
- spacepy.plot.spectrogram »

# spacepy.plot.spectrogram.spectrogram

class `spacepy.plot.spectrogram.``spectrogram`(data, **kwargs)

  This class rebins data to produce a 2D data map that can be plotted as a spectrogram

  It is meant to be used on arbitrary data series. The first series “x” is plotted on the abscissa and second series “y” is plotted on the ordinate and the third series “z” is plotted in color.

  The series are not passed in independently but instead inside a `SpaceData` container.

  Parameters: | data : `SpaceData` The data for the spectrogram, the variables to be used default to “Epoch” for x, “Energy” for y, and “Flux” for z. Other names are specified using the ‘variables’ keyword. All keywords override .attrs contents.
  Other Parameters:
  | variables : list keyword containing the names of the variables to use for the spectrogram the list is a list of the SpaceData keys in x, y, z, order bins : list if the name “bins” is not specified in the .attrs of the dmarray variable this specifies the bins for each variable in a [[xbins], [ybins]] format xlim : list if the name “lim” is not specified in the .attrs of the dmarray variable this specifies the limit for the x variable [xlow, xhigh] ylim : list if the name “lim” is not specified in the .attrs of the dmarray variable this specifies the limit for the y variable [ylow, yhigh] zlim : list if the name “lim” is not specified in the .attrs of the dmarray variable this specifies the limit for the z variable [zlow, zhigh] extended_out : bool (optional) if this is True add more information to the output data model (defualt False)

  Notes

  Helper routines are planned to facilitate the creation of the SpaceData container if the data are not in the format.

  `plot`([fignum, axis]) | Plot the spectrogram

  `plot`(fignum=None, axis=None, **kwargs)

    Plot the spectrogram

    Other Parameters:
    | title : str plot title (default ‘’) xlabel : str x axis label (default ‘’) ylabel : str y axis label (default ‘’) colorbar_label : str colorbar label (default ‘’) DateFormatter : matplotlib.dates.DateFormatter The formatting to use on the dates on the x-axis (default matplotlib.dates.DateFormatter(“%d %b %Y”)) zlog : bool plot the z variable on a log scale (default True) colorbar : bool plot the colorbar (default True) axis : matplotlib axis object axis to plot the spectrogram to zlim : np.array array like 2 element that overrides (interior) the spectrogram zlim (default spectrogram.specSettings[‘zlim’]) figsize : tuple (optional) tuple of size to pass to figure(), None does the default

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- homepage|
- search|
- documentation »
- plot - Plot, various specialized plotting functions and associated utilities »
- spacepy.plot.spectrogram »