class sunpy.visualization.animator.MapSequenceAnimator(mapsequence, annotate=True, **kwargs)[source]#

Bases: BaseFuncAnimator

Create an interactive viewer for a MapSequence.

The following keyboard shortcuts are defined in the viewer:

  • ‘left’: previous step on active slider.

  • ‘right’: next step on active slider.

  • ‘top’: change the active slider up one.

  • ‘bottom’: change the active slider down one.

  • ‘p’: play/pause active slider.

  • mapsequence ( – A MapSequence.

  • annotate (bool) – Annotate the figure with scale and titles.

  • fig (matplotlib.figure.Figure) – Figure to use.

  • interval (int) – Animation interval in milliseconds.

  • colorbar (bool) – Plot colorbar.

  • plot_function (function) – A function to call when each Map is plotted, the function must have the signature (fig, axes, smap) where fig and axes are the figure and axes objects of the plot and smap is the current frame’s Map object. Any objects returned from this function will have their remove() method called at the start of the next frame to clear them from the plot.


Extra keywords are passed to mapsequence[0].plot() i.e. the plot() routine of the maps in the sequence.

Methods Summary


This method creates the initial image on the matplotlib.axes.Axes.

updatefig(val, im, slider)

Methods Documentation


This method creates the initial image on the matplotlib.axes.Axes.


This method needs to be implemented in subclasses.


ax (matplotlib.axes.Axes) – This is the axes on which to plot the image.


matplotlib.artist.Artist – The matplotlib object to be animated, this is usually either a AxesImage object, or a Line2D.

updatefig(val, im, slider)[source]#