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

Skip to content

Commit 54202ec

Browse files
committed
Remove deprecated functions in matplotlib.path.
1 parent 0384b85 commit 54202ec

File tree

2 files changed

+6
-23
lines changed

2 files changed

+6
-23
lines changed

doc/api/api_changes/code_removal.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ removed.
2222
The ``ArtistInspector.findobj`` method, which was never working due to the lack
2323
of a ``get_children`` method, has been removed.
2424

25+
The deprecated ``point_in_path``, ``get_path_extents``,
26+
``point_in_path_collection``, ``path_intersects_path``,
27+
``convert_path_to_polygons``, ``cleanup_path`` and ``clip_path_to_rect``
28+
functions in the ``matplotlib.path`` module have been removed. Their
29+
functionality remains exposed as methods on the ``Path`` class.
30+
2531

2632
`Axes.set_aspect("normal")`
2733
---------------------------

lib/matplotlib/path.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,26 +1024,3 @@ def get_paths_extents(paths, transforms=[]):
10241024
raise ValueError("No paths provided")
10251025
return Bbox.from_extents(*_path.get_path_collection_extents(
10261026
Affine2D(), paths, transforms, [], Affine2D()))
1027-
1028-
1029-
def _define_deprecated_functions(ns):
1030-
from .cbook import deprecated
1031-
1032-
# The C++ functions are not meant to be used directly.
1033-
# Users should use the more pythonic wrappers in the Path
1034-
# class instead.
1035-
for func, alternative in [
1036-
('point_in_path', 'path.Path.contains_point'),
1037-
('get_path_extents', 'path.Path.get_extents'),
1038-
('point_in_path_collection', 'collection.Collection.contains'),
1039-
('path_in_path', 'path.Path.contains_path'),
1040-
('path_intersects_path', 'path.Path.intersects_path'),
1041-
('convert_path_to_polygons', 'path.Path.to_polygons'),
1042-
('cleanup_path', 'path.Path.cleaned'),
1043-
('points_in_path', 'path.Path.contains_points'),
1044-
('clip_path_to_rect', 'path.Path.clip_to_bbox')]:
1045-
ns[func] = deprecated(
1046-
since='1.3', alternative=alternative)(getattr(_path, func))
1047-
1048-
1049-
_define_deprecated_functions(locals())

0 commit comments

Comments
 (0)