Skip to content

Commit e2039f8

Browse files
committed
lint
1 parent 247833c commit e2039f8

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
subplots_adjust has a new ``kwarg``: ``rc_default``
22
---------------------------------------------------
33

4-
`.Figure.subplots_adjust` and `.pyplot.subplots_adjust` have a new ``kwarg``:
4+
`.Figure.subplots_adjust` and `.pyplot.subplots_adjust` have a new ``kwarg``:
55
``rc_default`` that determines the default values for the subplot parameters.
66

7-
The `.figure.SubplotParams` object has a new get method
7+
The `.figure.SubplotParams` object has a new get method
88
:meth:`~.SubplotParams.get_subplot_params`
99

1010
When calling `.Figure.clear()` the settings for `SubplotParams` are restored to the default values.
1111

12-
(code based on work by @fredrik-1)
12+
(code based on work by @fredrik-1)

lib/matplotlib/figure.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ class FigureBase(Artist):
158158
top: float | None = ...,
159159
wspace: float | None = ...,
160160
hspace: float | None = ...,
161+
rc_default: bool = ...,
161162
) -> None: ...
162163
def align_xlabels(self, axs: Iterable[Axes] | None = ...) -> None: ...
163164
def align_ylabels(self, axs: Iterable[Axes] | None = ...) -> None: ...

lib/matplotlib/gridspec.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -774,15 +774,16 @@ def update(self, left=None, bottom=None, right=None, top=None,
774774
wspace=None, hspace=None, rc_default=False):
775775
"""
776776
Update the dimensions of the passed parameters. *None* means unchanged.
777-
If *rc_default* is True, then restore the parameters with value *None* to the default.
777+
If *rc_default* is True, then restore the parameters with value *None*
778+
to the default.
778779
"""
779780
if ((left if left is not None else self.left)
780781
>= (right if right is not None else self.right)):
781782
raise ValueError('left cannot be >= right')
782783
if ((bottom if bottom is not None else self.bottom)
783784
>= (top if top is not None else self.top)):
784785
raise ValueError('bottom cannot be >= top')
785-
786+
786787
attributes = {'left': left, 'right': right, 'bottom': bottom, 'top': top,
787788
'hspace': hspace, 'wspace': wspace}
788789
for key, value in attributes.items():
@@ -800,4 +801,3 @@ def get_subplot_params(self) -> dict[str, float]:
800801
A dictionary with the subplot parameters
801802
"""
802803
return self.__dict__.copy()
803-

lib/matplotlib/gridspec.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,8 @@ class SubplotParams:
157157
top: float | None = ...,
158158
wspace: float | None = ...,
159159
hspace: float | None = ...,
160+
rc_default: bool = ...,
160161
) -> None: ...
162+
def get_subplot_params(
163+
self,
164+
) -> dict[str, float]: ...

0 commit comments

Comments
 (0)