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

Commit 372741c

Browse filesBrowse files
committed
Remove Bezier and Path deprecations from 3.3.
1 parent c51ae6d commit 372741c
Copy full SHA for 372741c

File tree

Expand file treeCollapse file tree

3 files changed

+9
-27
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+9
-27
lines changed

‎doc/api/next_api_changes/removals/20465-ES.rst

Copy file name to clipboardExpand all lines: doc/api/next_api_changes/removals/20465-ES.rst
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,11 @@ Artist-specific removals
4545
have been removed, for consistency with ``AxesImage.is_grayscale``. (Note
4646
that previously, these attributes were only available *after rendering the
4747
image*).
48+
49+
Path helpers
50+
~~~~~~~~~~~~
51+
* ``bezier.make_path_regular``; use ``Path.cleaned()`` (or
52+
``Path.cleaned(curves=True)``, etc.) instead, but note that these methods add
53+
a ``STOP`` code at the end of the path.
54+
* ``bezier.concatenate_paths``; use ``Path.make_compound_path()`` instead.
55+
* *quantize* parameter of `.Path.cleaned()`

‎lib/matplotlib/bezier.py

Copy file name to clipboardExpand all lines: lib/matplotlib/bezier.py
-25Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -593,28 +593,3 @@ def make_wedged_bezier2(bezier2, width, w1=1., wm=0.5, w2=0.):
593593
c3x_right, c3y_right)
594594

595595
return path_left, path_right
596-
597-
598-
@_api.deprecated(
599-
"3.3", alternative="Path.cleaned() and remove the final STOP if needed")
600-
def make_path_regular(p):
601-
"""
602-
If the ``codes`` attribute of `.Path` *p* is None, return a copy of *p*
603-
with ``codes`` set to (MOVETO, LINETO, LINETO, ..., LINETO); otherwise
604-
return *p* itself.
605-
"""
606-
from .path import Path
607-
c = p.codes
608-
if c is None:
609-
c = np.full(len(p.vertices), Path.LINETO, dtype=Path.code_type)
610-
c[0] = Path.MOVETO
611-
return Path(p.vertices, c)
612-
else:
613-
return p
614-
615-
616-
@_api.deprecated("3.3", alternative="Path.make_compound_path()")
617-
def concatenate_paths(paths):
618-
"""Concatenate a list of paths into a single path."""
619-
from .path import Path
620-
return Path.make_compound_path(*paths)

‎lib/matplotlib/path.py

Copy file name to clipboardExpand all lines: lib/matplotlib/path.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,8 @@ def iter_bezier(self, **kwargs):
458458
raise ValueError("Invalid Path.code_type: " + str(code))
459459
prev_vert = verts[-2:]
460460

461-
@_api.delete_parameter("3.3", "quantize")
462461
def cleaned(self, transform=None, remove_nans=False, clip=None,
463-
quantize=False, simplify=False, curves=False,
462+
*, simplify=False, curves=False,
464463
stroke_width=1.0, snap=False, sketch=None):
465464
"""
466465
Return a new Path with vertices and codes cleaned according to the

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.