diff --git a/galleries/users_explain/quick_start.py b/galleries/users_explain/quick_start.py index 1970f71f737c..b525af40b9a6 100644 --- a/galleries/users_explain/quick_start.py +++ b/galleries/users_explain/quick_start.py @@ -496,7 +496,7 @@ def my_plotter(ax, data1, data2, param_dict): ax3.plot(t, s) ax3.set_xlabel('Angle [rad]') -ax4 = ax3.secondary_xaxis('top', functions=(np.rad2deg, np.deg2rad)) +ax4 = ax3.secondary_xaxis('top', (np.rad2deg, np.deg2rad)) ax4.set_xlabel('Angle [°]') # %% diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 45a039d49928..9b1a2c629889 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -570,7 +570,7 @@ def indicate_inset_zoom(self, inset_ax, **kwargs): return self.indicate_inset(rect, inset_ax, **kwargs) @_docstring.dedent_interpd - def secondary_xaxis(self, location, *, functions=None, transform=None, **kwargs): + def secondary_xaxis(self, location, functions=None, *, transform=None, **kwargs): """ Add a second x-axis to this `~.axes.Axes`. @@ -624,7 +624,7 @@ def invert(x): return secondary_ax @_docstring.dedent_interpd - def secondary_yaxis(self, location, *, functions=None, transform=None, **kwargs): + def secondary_yaxis(self, location, functions=None, *, transform=None, **kwargs): """ Add a second y-axis to this `~.axes.Axes`. diff --git a/lib/matplotlib/axes/_axes.pyi b/lib/matplotlib/axes/_axes.pyi index be0a0e48d662..007499f23381 100644 --- a/lib/matplotlib/axes/_axes.pyi +++ b/lib/matplotlib/axes/_axes.pyi @@ -88,24 +88,24 @@ class Axes(_AxesBase): def secondary_xaxis( self, location: Literal["top", "bottom"] | float, - *, functions: tuple[ Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike] ] | Transform | None = ..., + *, transform: Transform | None = ..., **kwargs ) -> SecondaryAxis: ... def secondary_yaxis( self, location: Literal["left", "right"] | float, - *, functions: tuple[ Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike] ] | Transform | None = ..., + *, transform: Transform | None = ..., **kwargs ) -> SecondaryAxis: ...