# spacepy.plot.Spectrogram

spacepy.plot.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 (default True)

  Notes

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

  Examples

      >>> import spacepy.datamodel as dm
      >>> import numpy as np
      >>> import spacepy.plot as splot
      >>> sd = dm.SpaceData()
      >>> sd['radius'] = dm.dmarray(2*np.sin(np.linspace(0,30,500))+4, attrs={'units':'km'})
      >>> sd['day_of_year'] = dm.dmarray(np.linspace(74,77,500))
      >>> sd['1D_dataset'] = dm.dmarray(np.random.normal(10,3,500)*sd['radius'])
      >>> spec = splot.Spectrogram(sd, variables=['day_of_year', 'radius', '1D_dataset'])
      >>> ax = spec.plot()

  `plot`([target, loc, figsize]) | Plot the spectrogram