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 704c12b

Browse filesBrowse files
committed
Fix Bezier degree elevation formula in backend_cairo.
The quad_bezier example would previously fail under the cairo backend; this patch fixes it.
1 parent da58453 commit 704c12b
Copy full SHA for 704c12b

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎lib/matplotlib/backends/backend_cairo.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_cairo.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ def _append_paths_slow(ctx, paths, transforms, clip=None):
9797
elif code == Path.LINETO:
9898
ctx.line_to(*points)
9999
elif code == Path.CURVE3:
100-
cur = ctx.get_current_point()
101-
ctx.curve_to(
102-
*np.concatenate([cur / 3 + points[:2] * 2 / 3,
103-
points[:2] * 2 / 3 + points[-2:] / 3]))
100+
cur = np.asarray(ctx.get_current_point())
101+
a = points[:2]
102+
b = points[-2:]
103+
ctx.curve_to(*(cur / 3 + a * 2 / 3), *(a * 2 / 3 + b / 3), *b)
104104
elif code == Path.CURVE4:
105105
ctx.curve_to(*points)
106106

0 commit comments

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