diff --git a/doc/api/next_api_changes/deprecations/25774-AL.rst b/doc/api/next_api_changes/deprecations/25774-AL.rst new file mode 100644 index 000000000000..0b47d4ebffe7 --- /dev/null +++ b/doc/api/next_api_changes/deprecations/25774-AL.rst @@ -0,0 +1,4 @@ +Callable axisartist Axes +~~~~~~~~~~~~~~~~~~~~~~~~ +Calling an axisartist Axes to mean `~pyplot.axis` is deprecated; explicitly +call the method instead. diff --git a/lib/mpl_toolkits/axisartist/axislines.py b/lib/mpl_toolkits/axisartist/axislines.py index e63c3b39646c..35717da8eaa9 100644 --- a/lib/mpl_toolkits/axisartist/axislines.py +++ b/lib/mpl_toolkits/axisartist/axislines.py @@ -407,6 +407,7 @@ def get_gridlines(self, which="major", axis="both"): class Axes(maxes.Axes): + @_api.deprecated("3.8", alternative="ax.axis") def __call__(self, *args, **kwargs): return maxes.Axes.axis(self.axes, *args, **kwargs) @@ -440,7 +441,7 @@ def clear(self): # Init gridlines before clear() as clear() calls grid(). self.gridlines = gridlines = GridlinesCollection( - [], transform=self.transData, + [], colors=mpl.rcParams['grid.color'], linestyles=mpl.rcParams['grid.linestyle'], linewidths=mpl.rcParams['grid.linewidth'])
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: