Skip to main content
`Ctrl`+`K`

# MatplotlibSequencePlotter

class ndcube.visualization.mpl_sequence_plotter.MatplotlibSequencePlotter(ndcube=None)

  Bases: `BasePlotter`

  Provide visualization methods for NDCubeSequence which use `matplotlib`.

  This plotter delegates much of the visualization to the `ndcube.NDCube.plot` which is assumed to employ the `MatplotlibPlotter`.

  Methods Summary

  `animate`([sequence_axis_coords, ...]) | Animate the `NDCubeSequence` with the sequence axis as a slider.
  `plot`([sequence_axis_coords, sequence_axis_unit]) | Visualize the `NDCubeSequence`.

  Methods Documentation

  animate(
    sequence_axis_coords=None,
    sequence_axis_unit=None,
    **kwargs,
  )

    Animate the `NDCubeSequence` with the sequence axis as a slider.

    Keyword arguments are passed to `ndcube.visualization.mpl_plotter.MatplotlibPlotter.plot` and therefore only apply to cube axes, not the sequence axis. See that method’s docstring for definition of keyword arguments.

    Parameters:

      - sequence_axis_coords (`str` optional) – The name of the coordinate in `sequence_axis_coords` to be used as the slider pixel values. If None, array indices will be used.

      - sequence_axis_units (`astropy.units.Unit` or `str`, optional) – The unit in which the sequence_axis_coordinates should be displayed. If None, the default unit will be used.

  plot(
    sequence_axis_coords=None,
    sequence_axis_unit=None,
    **kwargs,
  )

    Visualize the `NDCubeSequence`.

    Parameters:

      - sequence_axis_coords (`str` or array-like, optional) – The real world value of each step along the sequence axis. If `str`, the values are taken from `ndcube.NDCubeSequence.sequence_axis_coords`.

      - sequence_axis_unit (`str` or `astropy.units.Unit`, optional) – The unit in which to display the sequence_axis_coords.