MatplotlibPlotter

class ndcube.visualization.mpl_plotter.MatplotlibPlotter(ndcube=None)[source]

Bases: BasePlotter

Provide visualization methods for NDCube which use matplotlib.

Methods Summary

plot([axes, plot_axes, axes_coordinates, ...])

Visualize the NDCube.

Methods Documentation

plot(axes=None, plot_axes=None, axes_coordinates=None, axes_units=None, data_unit=None, wcs=None, **kwargs)[source]

Visualize the NDCube.

Parameters:
  • axes (WCSAxes or None:, optional) – The axes to plot onto. If None the current axes will be used.

  • plot_axes (list, optional) – A list of length equal to the number of pixel dimensions in array axis order. This list selects which cube axes are displayed on which plot axes. For an image plot this list should contain 'x' and 'y' for the plot axes and None for all the other elements. For a line plot it should only contain 'x' and None for all the other elements.

  • axes_unit (list, optional) – A list of length equal to the number of world dimensions specifying the units of each axis, or None to use the default unit for that axis.

  • axes_coordinates (list, optional) – A list of length equal to the number of pixel dimensions. For each axis the value of the list should either be a string giving the world axis type or None to use the default axis from the WCS.

  • data_unit (astropy.unit.Unit) – The data is changed to the unit given or the NDCube.unit if not given.

  • wcs (astropy.wcs.wcsapi.BaseHighLevelWCS) – The WCS object to define the coordinates of the plot axes.

  • kwargs – Additional keyword arguments are given to the underlying plotting infrastructure which depends on the dimensionality of the data and whether 1 or 2 plot_axes are defined: - Animations: mpl_animators.ArrayAnimatorWCS - Static 2-D images: matplotllib.pyplot.imshow - Static 1-D line plots: matplotllib.pyplot.plot