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

Make arguments other than renderer keyword-only for get_tightbbox #24990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions 5 doc/api/next_api_changes/deprecations/24990-OG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Arguments other than ``renderer`` to ``get_tightbbox``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

... are keyword-only arguments. This is for consistency and that
different classes have different additional arguments.
1 change: 1 addition & 0 deletions 1 lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4328,6 +4328,7 @@ def get_default_bbox_extra_artists(self):
return [a for a in artists if a.get_visible() and a.get_in_layout()
and (isinstance(a, noclip) or not a._fully_clipped_to_axes())]

@_api.make_keyword_only("3.8", "call_axes_locator")
def get_tightbbox(self, renderer=None, call_axes_locator=True,
bbox_extra_artists=None, *, for_layout_only=False):
"""
Expand Down
1 change: 1 addition & 0 deletions 1 lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1688,6 +1688,7 @@ def get_default_bbox_extra_artists(self):
bbox_artists.extend(ax.get_default_bbox_extra_artists())
return bbox_artists

@_api.make_keyword_only("3.8", "bbox_extra_artists")
def get_tightbbox(self, renderer=None, bbox_extra_artists=None):
"""
Return a (tight) bounding box of the figure *in inches*.
Expand Down
1 change: 1 addition & 0 deletions 1 lib/mpl_toolkits/axes_grid1/parasite_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def _remove_any_twin(self, ax):
self.axis[tuple(restore)].set_visible(True)
self.axis[tuple(restore)].toggle(ticklabels=False, label=False)

@_api.make_keyword_only("3.8", "call_axes_locator")
def get_tightbbox(self, renderer=None, call_axes_locator=True,
bbox_extra_artists=None):
bbs = [
Expand Down
1 change: 1 addition & 0 deletions 1 lib/mpl_toolkits/mplot3d/axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -3181,6 +3181,7 @@ def _digout_minmax(err_arr, coord_label):

return errlines, caplines, limmarks

@_api.make_keyword_only("3.8", "call_axes_locator")
def get_tightbbox(self, renderer=None, call_axes_locator=True,
bbox_extra_artists=None, *, for_layout_only=False):
ret = super().get_tightbbox(renderer,
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.