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 d960f03

Browse filesBrowse files
committed
Fix regression tests.
1 parent d99bb88 commit d960f03
Copy full SHA for d960f03

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+6
-4
lines changed

‎lib/matplotlib/tests/test_patches.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_patches.py
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,19 @@ def test_Polygon_close():
4949

5050
@image_comparison(baseline_images=['clip_to_bbox'])
5151
def test_clip_to_bbox():
52-
plt.figure()
52+
fig = plt.figure()
5353

54-
ax = plt.axes()
54+
ax = fig.add_subplot(111)
5555
ax.set_xlim([-18, 20])
5656
ax.set_ylim([-150, 100])
5757

58-
path = mpath.Path.unit_regular_star(8)
58+
star = mpath.Path.unit_regular_star(8)
59+
path = mpath.Path(star.vertices.copy(), star.codes)
5960
path.vertices *= [10, 100]
6061
path.vertices -= [5, 25]
6162

62-
path2 = mpath.Path.unit_circle()
63+
circle = mpath.Path.unit_circle()
64+
path2 = mpath.Path(circle.vertices.copy(), circle.codes)
6365
path2.vertices *= [10, 100]
6466
path2.vertices += [10, -25]
6567

0 commit comments

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