Repository: sunpy/sunpy

Issue:
Issue  warning from map.plot if wcsaxes is availible and a non-WCSAxes object is being used.
This is to make it more obvious to users that if you create your own axes object it will not behave the same as the default map.plot command.



Discussion:
This is definitely confusing and should be fixed. The documentation should also be updated to provide some guidance on this.

I am fixing this. 


Resolving patch:
diff --git a/sunpy/map/mapbase.py b/sunpy/map/mapbase.py
--- a/sunpy/map/mapbase.py
+++ b/sunpy/map/mapbase.py
@@ -1584,6 +1584,11 @@ def plot(self, annotate=True, axes=None, title=True, **imshow_kwargs):
             warnings.warn("This map is not properly oriented. Plot axes may be incorrect",
                           Warning)
 
+        if not wcsaxes_compat.is_wcsaxes(axes) and wcsaxes_compat.HAVE_WCSAXES:
+            warnings.warn("WCSAxes is installed but not being used."
+                          " Plots may not have the expected behaviour.",
+                          Warning)
+
         # Normal plot
         imshow_args = deepcopy(self.plot_settings)
         if 'title' in imshow_args:
diff --git a/sunpy/visualization/wcsaxes_compat.py b/sunpy/visualization/wcsaxes_compat.py
--- a/sunpy/visualization/wcsaxes_compat.py
+++ b/sunpy/visualization/wcsaxes_compat.py
@@ -14,12 +14,13 @@
 
 except ImportError:
     HAVE_WCSAXES = False
-    warnings.warn("SunPy plotting is improved by installing the WCSAxes module: http://wcsaxes.readthedocs.io/en/latest/index.html")
+    warnings.warn("SunPy plotting is improved by installing the WCSAxes module: http://wcsaxes.readthedocs.io/")
 
 FORCE_NO_WCSAXES = False
 
 __all__ = ['HAVE_WCSAXES', 'is_wcsaxes', 'FORCE_NO_WCSAXES']
 
+
 def is_wcsaxes(axes):
     """
     Test a matplotlib Axes object to see if it is an instance of WCSAxes.
@@ -73,6 +74,7 @@ def gca_wcs(wcs, fig=None):
 
     return ax
 
+
 def get_world_transform(axes):
     """
     Get the transformation to world coordinates.
@@ -98,6 +100,7 @@ def get_world_transform(axes):
 
     return transform
 
+
 def default_wcs_grid(axes):
     """
     Apply some default wcsaxes grid formatting.
@@ -129,6 +132,7 @@ def default_wcs_grid(axes):
 
     axes.coords.grid(color='white', alpha=0.6)
 
+
 def wcsaxes_heliographic_overlay(axes):
     """
     Create a heliographic overlay using wcsaxes.
@@ -144,12 +148,8 @@ def wcsaxes_heliographic_overlay(axes):
     -------
     overlay : wcsaxes overlay
         The overlay object.
-
-    .. note::
-        This function requires the WIP sunpy.coordinates module.
-
     """
-    overlay = axes.get_coords_overlay('heliographicstonyhurst')
+    overlay = axes.get_coords_overlay('heliographic_stonyhurst')
 
     lon = overlay[0]
     lat = overlay[1]


Test patch:
diff --git a/sunpy/map/tests/test_mapbase.py b/sunpy/map/tests/test_mapbase.py
--- a/sunpy/map/tests/test_mapbase.py
+++ b/sunpy/map/tests/test_mapbase.py
@@ -526,6 +526,7 @@ def test_plot_masked_aia171_superpixel_nowcsaxes(aia171_test_map_with_mask):
     ax = plt.gca()
     aia171_test_map_with_mask.superpixel((9, 7)*u.pix, offset=(4, 4)*u.pix).plot(axes=ax)
 
+
 def test_validate_meta(generic_map):
     """Check to see if_validate_meta displays an appropriate error"""
     with warnings.catch_warnings(record=True) as w: