8000 MNT: Remove return_all kwarg from gridspec get_position · matplotlib/matplotlib@59f743e · GitHub
[go: up one dir, main page]

Skip to content

Commit 59f743e

Browse files
committed
MNT: Remove return_all kwarg from gridspec get_position
This follows the deprecation period.
1 parent de85cf6 commit 59f743e

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

doc/api/next_api_changes/removals/23XXX-GL.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ or GUI-specific methods if embedding.
99

1010
There is no replacement, it was considered an internal helper.
1111

12+
The **return_all** keyword argument has been removed from ``gridspec.get_position()``
13+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

lib/matplotlib/gridspec.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -664,8 +664,7 @@ def is_first_col(self):
664664
def is_last_col(self):
665665
return self.colspan.stop == self.get_gridspec().ncols
666666

667-
@_api.delete_parameter("3.4", "return_all")
668-
def get_position(self, figure, return_all=False):
667+
def get_position(self, figure):
669668
"""
670669
Update the subplot position from ``figure.subplotpars``.
671670
"""
@@ -679,12 +678,7 @@ def get_position(self, figure, return_all=False):
679678
fig_top = fig_tops[rows].max()
680679
fig_left = fig_lefts[cols].min()
681680
fig_right = fig_rights[cols].max()
682-
figbox = Bbox.from_extents(fig_left, fig_bottom, fig_right, fig_top)
683-
684-
if return_all:
685-
return figbox, rows[0], cols[0], nrows, ncols
686-
else:
687-
return figbox
681+
return Bbox.from_extents(fig_left, fig_bottom, fig_right, fig_top)
688682

689683
def get_topmost_subplotspec(self):
690684
"""

0 commit comments

Comments
 (0)
0