8000 Fix regression tests. · matplotlib/matplotlib@d960f03 · GitHub
[go: up one dir, main page]

Skip to content

Commit d960f03

Browse files
committed
Fix regression tests.
1 parent d99bb88 commit d960f03

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/matplotlib/tests/test_patches.py

Lines changed: 6 additi E30B ons & 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