gca_wcs#

sunpy.visualization.wcsaxes_compat.gca_wcs(wcs, fig=None, slices=None)[source]#

Get the current axes, or create a new WCSAxes if fig has no axes.

Parameters:
  • wcs (astropy.wcs.WCS) – A WCS object used to create a new axes.

  • fig (matplotlib.figure.Figure) – The figure in which to check for the axes. If None, the current figure is used (or a new one created if there are no current figures).

  • slices (tuple) – slices is passed to WCSAxes to describe which two dimensions of the WCS object are being plotted. This slices the multidimensional wcs object in the way it needs to be sliced.

Returns:

matplotlib.axes.Axes or WCSAxes – The current axes, or a new one if created.