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 e92da6b

Browse filesBrowse files
committed
backport bezier import fix without API change
1 parent bcc2852 commit e92da6b
Copy full SHA for e92da6b

File tree

Expand file treeCollapse file tree

3 files changed

+8
-6
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+8
-6
lines changed

‎doc/api/next_api_changes/removals.rst

Copy file name to clipboardExpand all lines: doc/api/next_api_changes/removals.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Classes, methods and attributes
103103

104104
- ``image.BboxImage.interp_at_native`` property (no replacement)
105105
- ``lines.Line2D.verticalOffset`` property (no replacement)
106-
- ``bezier.find_r_to_boundary_of_closedpath()`` (no relacement)
106+
- ``bezier.find_r_to_boundary_of_closedpath()`` (no replacement)
107107

108108
- ``quiver.Quiver.color()`` (use ``Quiver.get_facecolor()`` instead)
109109
- ``quiver.Quiver.keyvec`` property (no replacement)

‎lib/matplotlib/bezier.py

Copy file name to clipboardExpand all lines: lib/matplotlib/bezier.py
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
import numpy as np
88

99
import matplotlib.cbook as cbook
10-
from matplotlib.path import Path
1110

1211

1312
class NonIntersectingPathException(ValueError):
1413
pass
1514

15+
1616
# some functions
1717

1818

@@ -230,6 +230,7 @@ def split_path_inout(path, inside, tolerance=0.01, reorder_inout=False):
230230
Divide a path into two segments at the point where ``inside(x, y)`` becomes
231231
False.
232232
"""
233+
from .path import Path
233234
path_iter = path.iter_segments()
234235

235236
ctl_points, command = next(path_iter)
@@ -486,6 +487,7 @@ def make_path_regular(p):
486487
with ``codes`` set to (MOVETO, LINETO, LINETO, ..., LINETO); otherwise
487488
return *p* itself.
488489
"""
490+
from .path import Path
489491
c = p.codes
490492
if c is None:
491493
c = np.full(len(p.vertices), Path.LINETO, dtype=Path.code_type)
@@ -498,6 +500,5 @@ def make_path_regular(p):
498500
@cbook.deprecated("3.3", alternative="Path.make_compound_path()")
499501
def concatenate_paths(paths):
500502
"""Concatenate a list of paths into a single path."""
501-
vertices = np.concatenate([p.vertices for p in paths])
502-
codes = np.concatenate([make_path_regular(p).codes for p in paths])
503-
return Path(vertices, codes)
503+
from .path import Path
504+
return Path.make_compound_path(*paths)

‎lib/matplotlib/path.py

Copy file name to clipboardExpand all lines: lib/matplotlib/path.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,8 @@ def unit_rectangle(cls):
647647
def unit_regular_polygon(cls, numVertices):
648648
"""
649649
Return a :class:`Path` instance for a unit regular polygon with the
650-
given *numVertices* and radius of 1.0, centered at (0, 0).
650+
given *numVertices* such that the circumscribing circle has radius 1.0,
651+
centered at (0, 0).
651652
"""
652653
if numVertices <= 16:
653654
path = cls._unit_regular_polygons.get(numVertices)

0 commit comments

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