gca_wcs#
- sunpy.visualization.wcsaxes_compat.gca_wcs(wcs, fig=None, slices=None)[source]#
Get the current axes, or create a new
WCSAxes
iffig
has no axes.- Parameters:
wcs (
astropy.wcs.WCS
) – AWCS
object used to create a new axes.fig (
matplotlib.figure.Figure
) – The figure in which to check for the axes. IfNone
, the current figure is used (or a new one created if there are no current figures).slices (
tuple
) –slices
is passed toWCSAxes
to describe which two dimensions of theWCS
object are being plotted. This slices the multidimensional wcs object in the way it needs to be sliced.
- Returns:
matplotlib.axes.Axes
orWCSAxes
– The current axes, or a new one if created.