From 4a0bfa7007ba44c10d2ac522bec93ff32d149a2d Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Tue, 7 Feb 2017 16:34:24 -0800 Subject: [PATCH] Remove deprecated shims from matplotlib 1.3 None of these shims seem to be used in the codebase. There is a couple of direct use of `_path` though. --- doc/api/api_changes/code_removal.rst | 14 ++++++++++++++ lib/matplotlib/path.py | 23 ----------------------- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/doc/api/api_changes/code_removal.rst b/doc/api/api_changes/code_removal.rst index 991240cac0e1..273fcba13460 100644 --- a/doc/api/api_changes/code_removal.rst +++ b/doc/api/api_changes/code_removal.rst @@ -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")` --------------------------- diff --git a/lib/matplotlib/path.py b/lib/matplotlib/path.py index 58e984d2cc5d..299306ad473b 100644 --- a/lib/matplotlib/path.py +++ b/lib/matplotlib/path.py @@ -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()) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy