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

Removed the deprecated code from offsetbox.py #26910

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 8 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
9 changes: 9 additions & 0 deletions 9 doc/api/next_api_changes/removals/26910-JP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
``bbox_artist``
~~~~~~~~~~
... of `matplotlib.offsetbox` is removed without replacements.
``get_extent_offsets``
~~~~~~~~~~~~~~
... of `matplotlib.offsetbox` is removed without replacements.
``get_extent``
~~~~~~~~~~~~~~
... of `matplotlib.offsetbox` is removed without replacements.
32 changes: 0 additions & 32 deletions 32 lib/matplotlib/offsetbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ def get_offset(self, *args, **kwargs):
return get_offset


@_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:
Expand Down Expand Up @@ -366,32 +360,6 @@ def get_bbox(self, renderer):
bbox, offsets = self._get_bbox_and_child_offsets(renderer)
return bbox

@_api.deprecated("3.7", alternative="get_bbox and child.get_offset")
def get_extent_offsets(self, renderer):
"""
Update offset of the children and return the extent of the box.

Parameters
----------
renderer : `.RendererBase` subclass

Returns
-------
width
height
xdescent
ydescent
list of (xoffset, yoffset) pairs
"""
bbox, offsets = self._get_bbox_and_child_offsets(renderer)
return bbox.width, bbox.height, -bbox.x0, -bbox.y0, offsets

@_api.deprecated("3.7", alternative="get_bbox")
def get_extent(self, renderer):
"""Return a tuple ``width, height, xdescent, ydescent`` of the box."""
bbox = self.get_bbox(renderer)
return bbox.width, bbox.height, -bbox.x0, -bbox.y0

def get_window_extent(self, renderer=None):
# docstring inherited
if renderer is None:
Expand Down
7 changes: 0 additions & 7 deletions 7 lib/matplotlib/offsetbox.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ from typing import Any, Literal, overload

DEBUG: bool

def bbox_artist(*args, **kwargs) -> None: ...
def _get_packed_offsets(
widths: Sequence[float],
total: float | None,
Expand Down Expand Up @@ -51,12 +50,6 @@ class OffsetBox(martist.Artist):
def get_visible_children(self) -> list[martist.Artist]: ...
def get_children(self) -> list[martist.Artist]: ...
def get_bbox(self, renderer: RendererBase) -> Bbox: ...
def get_extent_offsets(
self, renderer: RendererBase
) -> tuple[float, float, float, float, list[tuple[float, float]]]: ...
def get_extent(
self, renderer: RendererBase
) -> tuple[float, float, float, float]: ...
def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox: ...

class PackerBase(OffsetBox):
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.