Skip to content

Commit

Permalink
Remove kwargs from WCSAxes.draw()
Browse files Browse the repository at this point in the history
Add changelog

Remove args, kwargs from _WCSAxesArtist.draw()
  • Loading branch information
dstansby committed May 8, 2023
1 parent f3934b0 commit 7f9c788
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions astropy/visualization/wcsaxes/core.py
Expand Up @@ -41,7 +41,7 @@ class _WCSAxesArtist(Artist):
and gridlines in the standary way.
"""

def draw(self, renderer, *args, **kwargs):
def draw(self, renderer):
self.axes.draw_wcsaxes(renderer)


Expand Down Expand Up @@ -502,7 +502,7 @@ def draw_wcsaxes(self, renderer):

self.coords.frame.draw(renderer)

def draw(self, renderer, **kwargs):
def draw(self, renderer):
"""Draw the axes."""
# Before we do any drawing, we need to remove any existing grid lines
# drawn with contours, otherwise if we try and remove the contours
Expand Down Expand Up @@ -533,7 +533,7 @@ def draw(self, renderer, **kwargs):
# We need to make sure that that frame path is up to date
self.coords.frame._update_patch_path()

super().draw(renderer, **kwargs)
super().draw(renderer)

self._drawn = True

Expand Down
2 changes: 2 additions & 0 deletions docs/changes/visualization/14772.api.rst
@@ -0,0 +1,2 @@
It is now not possible to pass any keyword arguments to ``astropy.visualization.wcsaxes.WCSAxes.draw()``.
Previously passing any keyword arguments would have errored anyway, as ``matplotlib.axes.Axes.draw()`` does not accept keyword arguments.

0 comments on commit 7f9c788

Please sign in to comment.