Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a4c5ac5

Browse filesBrowse files
authored
Merge pull request #24990 from oscargus/tighbboxconsistency
Make arguments other than `renderer` keyword-only for `get_tightbbox`
2 parents 87c9b47 + 3884c84 commit a4c5ac5
Copy full SHA for a4c5ac5

File tree

Expand file treeCollapse file tree

5 files changed

+9
-0
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+9
-0
lines changed
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Arguments other than ``renderer`` to ``get_tightbbox``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
... are keyword-only arguments. This is for consistency and that
5+
different classes have different additional arguments.

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4328,6 +4328,7 @@ def get_default_bbox_extra_artists(self):
43284328
return [a for a in artists if a.get_visible() and a.get_in_layout()
43294329
and (isinstance(a, noclip) or not a._fully_clipped_to_axes())]
43304330

4331+
@_api.make_keyword_only("3.8", "call_axes_locator")
43314332
def get_tightbbox(self, renderer=None, call_axes_locator=True,
43324333
bbox_extra_artists=None, *, for_layout_only=False):
43334334
"""

‎lib/matplotlib/figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,7 @@ def get_default_bbox_extra_artists(self):
16811681
bbox_artists.extend(ax.get_default_bbox_extra_artists())
16821682
return bbox_artists
16831683

1684+
@_api.make_keyword_only("3.8", "bbox_extra_artists")
16841685
def get_tightbbox(self, renderer=None, bbox_extra_artists=None):
16851686
"""
16861687
Return a (tight) bounding box of the figure *in inches*.

‎lib/mpl_toolkits/axes_grid1/parasite_axes.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axes_grid1/parasite_axes.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ def _remove_any_twin(self, ax):
215215
self.axis[tuple(restore)].set_visible(True)
216216
self.axis[tuple(restore)].toggle(ticklabels=False, label=False)
217217

218+
@_api.make_keyword_only("3.8", "call_axes_locator")
218219
def get_tightbbox(self, renderer=None, call_axes_locator=True,
219220
bbox_extra_artists=None):
220221
bbs = [

‎lib/mpl_toolkits/mplot3d/axes3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/mplot3d/axes3d.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3181,6 +3181,7 @@ def _digout_minmax(err_arr, coord_label):
31813181

31823182
return errlines, caplines, limmarks
31833183

3184+
@_api.make_keyword_only("3.8", "call_axes_locator")
31843185
def get_tightbbox(self, renderer=None, call_axes_locator=True,
31853186
bbox_extra_artists=None, *, for_layout_only=False):
31863187
ret = super().get_tightbbox(renderer,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.