Skip to content

Commit

Permalink
Fix error that occured with latest developer of Matplotlib due to the…
Browse files Browse the repository at this point in the history
… fact that plt.xlabel and plt.ylabel now pass loc=None by default to set_xlabel and set_ylabel.
  • Loading branch information
astrofrog committed Jan 21, 2020
1 parent 62299fd commit 3745f3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions astropy/visualization/wcsaxes/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def draw(self, renderer, inframe=False):
# xlabel). While these are meant to be a single positional argument,
# Matplotlib internally sometimes specifies e.g. set_xlabel(xlabel=...).

def set_xlabel(self, xlabel=None, labelpad=1, **kwargs):
def set_xlabel(self, xlabel=None, labelpad=1, loc=None, **kwargs):
if xlabel is None:
xlabel = kwargs.pop('label', None)
if xlabel is None:
Expand All @@ -474,7 +474,7 @@ def set_xlabel(self, xlabel=None, labelpad=1, **kwargs):
coord.set_axislabel(xlabel, minpad=labelpad, **kwargs)
break

def set_ylabel(self, ylabel=None, labelpad=1, **kwargs):
def set_ylabel(self, ylabel=None, labelpad=1, loc=None, **kwargs):
if ylabel is None:
ylabel = kwargs.pop('label', None)
if ylabel is None:
Expand Down

0 comments on commit 3745f3c

Please sign in to comment.