Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove kwargs from WCSAxes.draw() #14772

Merged
merged 1 commit into from May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.