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
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/24664-OG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
``offsetbox.bbox_artist``
~~~~~~~~~~~~~~~~~~~~~~~~~

... is deprecated. This is just a wrapper to call `.patches.bbox_artist` if a
flag is set in the file, so use that directly if you need the behavior.
16 changes: 11 additions & 5 deletions 16 lib/matplotlib/offsetbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,18 @@
DEBUG = False


# for debugging use
@_api.deprecated("3.7", alternative='patches.bbox_artist')
def bbox_artist(*args, **kwargs):
if DEBUG:
mbbox_artist(*args, **kwargs)


# for debugging use
def _bbox_artist(*args, **kwargs):
if DEBUG:
mbbox_artist(*args, **kwargs)


def _get_packed_offsets(widths, total, sep, mode="fixed"):
r"""
Pack boxes specified by their *widths*.
Expand Down Expand Up @@ -364,7 +370,7 @@ def draw(self, renderer):
for c, (ox, oy) in zip(self.get_visible_children(), offsets):
c.set_offset((px + ox, py + oy))
c.draw(renderer)
bbox_artist(self, renderer, fill=False, props=dict(pad=0.))
_bbox_artist(self, renderer, fill=False, props=dict(pad=0.))
self.stale = False


Expand Down Expand Up @@ -672,7 +678,7 @@ def draw(self, renderer):
c.set_clip_path(tpath)
c.draw(renderer)

bbox_artist(self, renderer, fill=False, props=dict(pad=0.))
_bbox_artist(self, renderer, fill=False, props=dict(pad=0.))
self.stale = False


Expand Down Expand Up @@ -794,7 +800,7 @@ def get_extent(self, renderer):
def draw(self, renderer):
# docstring inherited
self._text.draw(renderer)
bbox_artist(self, renderer, fill=False, props=dict(pad=0.))
_bbox_artist(self, renderer, fill=False, props=dict(pad=0.))
self.stale = False


Expand Down Expand Up @@ -877,7 +883,7 @@ def draw(self, renderer):
# docstring inherited
for c in self._children:
c.draw(renderer)
bbox_artist(self, renderer, fill=False, props=dict(pad=0.))
_bbox_artist(self, renderer, fill=False, props=dict(pad=0.))
self.stale = False


Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.