8000 Merge pull request #28133 from anntzer/saxkw · matplotlib/matplotlib@91234e2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 91234e2

Browse files
authored
Merge pull request #28133 from anntzer/saxkw
Make `functions` param to secondary_x/yaxis not keyword-only.
2 parents a3ccdfb + 7ae511a commit 91234e2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

galleries/users_explain/quick_start.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def my_plotter(ax, data1, data2, param_dict):
497497

498498
ax3.plot(t, s)
499499
ax3.set_xlabel('Angle [rad]')
500-
ax4 = ax3.secondary_xaxis('top', functions=(np.rad2deg, np.deg2rad))
500+
ax4 = ax3.secondary_xaxis('top', (np.rad2deg, np.deg2rad))
501501
ax4.set_xlabel('Angle [°]')
502502

503503
# %%

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ def indicate_inset_zoom(self, inset_ax, **kwargs):
570570
return self.indicate_inset(rect, inset_ax, **kwargs)
571571

572572
@_docstring.dedent_interpd
573-
def secondary_xaxis(self, location, *, functions=None, transform=None, **kwargs):
573+
def secondary_xaxis(self, location, functions=None, *, transform=None, **kwargs):
574574
"""
575575
Add a second x-axis to this `~.axes.Axes`.
576576
@@ -624,7 +624,7 @@ def invert(x):
624624
return secondary_ax
625625

626626
@_docstring.dedent_interpd
627-
def secondary_yaxis(self, location, *, functions=None, transform=None, **kwargs):
627+
def secondary_yaxis(self, location, functions=None, *, transform=None, **kwargs):
628628
"""
629629
Add a second y-axis to this `~.axes.Axes`.
630630

lib/matplotlib/axes/_axes.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,24 +88,24 @@ class Axes(_AxesBase):
8888
def secondary_xaxis(
8989
self,
9090
location: Literal["top", "bottom"] | float,
91-
*,
9291
functions: tuple[
9392
Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]
9493
]
9594
| Transform
9695
| None = ...,
96+
*,
9797
transform: Transform | None = ...,
9898
**kwargs
9999
) -> SecondaryAxis: ...
100100
def secondary_yaxis(
101101
self,
102102
location: Literal["left", "right"] | float,
103-
*,
104103
functions: tuple[
105104
Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]
106105
]
107106
| Transform
108107
| None = ...,
108+
*,
109109
transform: Transform | None = ...,
110110
**kwargs
111111
) -> SecondaryAxis: ...

0 commit comments

Comments
 (0)
0