Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove deprecated shims from matplotlib 1.3 #8044

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

Closed
wants to merge 1 commit into from
Closed
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
14 changes: 14 additions & 0 deletions doc/api/api_changes/code_removal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ removed.
The ``ArtistInspector.findobj`` method, which was never working due to the lack
of a ``get_children`` method, has been removed.

The following deprecated methods of :any:`matplotlib.path` have been removed.
All were deprecated since version Matplotlib 1.3. Replacement is shown in
bracket:

- ``point_in_path`` (use :any:`path.Path.contains_point`)
- ``get_path_extents`` (use :any:`path.Path.get_extents`)
- ``point_in_path_collection`` (use :any:`collection.Collection.contains`)
- ``path_in_path`` (use :any:`path.Path.contains_path`)
- ``path_intersects_path`` (use :any:`path.Path.intersects_path`)
- ``convert_path_to_polygons`` (use :any:`path.Path.to_polygons`)
- ``cleanup_path`` (use :any:`path.Path.cleaned`)
- ``points_in_path`` (use :any:`path.Path.contains_points`)
- ``clip_path_to_rect`` (use :any:`path.Path.clip_to_bbox`)


`Axes.set_aspect("normal")`
---------------------------
Expand Down
23 changes: 0 additions & 23 deletions lib/matplotlib/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,26 +1024,3 @@ def get_paths_extents(paths, transforms=[]):
raise ValueError("No paths provided")
return Bbox.from_extents(*_path.get_path_collection_extents(
Affine2D(), paths, transforms, [], Affine2D()))


def _define_deprecated_functions(ns):
from .cbook import deprecated

# The C++ functions are not meant to be used directly.
# Users should use the more pythonic wrappers in the Path
# class instead.
for func, alternative in [
('point_in_path', 'path.Path.contains_point'),
('get_path_extents', 'path.Path.get_extents'),
('point_in_path_collection', 'collection.Collection.contains'),
('path_in_path', 'path.Path.contains_path'),
('path_intersects_path', 'path.Path.intersects_path'),
('convert_path_to_polygons', 'path.Path.to_polygons'),
('cleanup_path', 'path.Path.cleaned'),
('points_in_path', 'path.Path.contains_points'),
('clip_path_to_rect', 'path.Path.clip_to_bbox')]:
ns[func] = deprecated(
since='1.3', alternative=alternative)(getattr(_path, func))


_define_deprecated_functions(locals())