@@ -1350,8 +1350,7 @@ def test_tricontour_path():
1350
1350
1351
1351
# Line strip from boundary to boundary
1352
1352
cs = ax .tricontour (triang , [1 , 0 , 0 , 0 , 0 ], levels = [0.5 ])
1353
- assert len (cs .collections ) == 1
1354
- paths = cs .collections [0 ].get_paths ()
1353
+ paths = cs .get_paths ()
1355
1354
assert len (paths ) == 1
1356
1355
expected_vertices = [[2 , 0 ], [1 , 1 ], [0 , 2 ]]
1357
1356
assert_array_almost_equal (paths [0 ].vertices , expected_vertices )
@@ -1361,8 +1360,7 @@ def test_tricontour_path():
1361
1360
1362
1361
# Closed line loop inside domain
1363
1362
cs = ax .tricontour (triang , [0 , 0 , 0 , 0 , 1 ], levels = [0.5 ])
1364
- assert len (cs .collections ) == 1
1365
- paths = cs .collections [0 ].get_paths ()
1363
+ paths = cs .get_paths ()
1366
1364
assert len (paths ) == 1
1367
1365
expected_vertices = [[3 , 1 ], [3 , 3 ], [1 , 3 ], [1 , 1 ], [3 , 1 ]]
1368
1366
assert_array_almost_equal (paths [0 ].vertices , expected_vertices )
@@ -1378,8 +1376,7 @@ def test_tricontourf_path():
1378
1376
1379
1377
# Polygon inside domain
1380
1378
cs = ax .tricontourf (triang , [0 , 0 , 0 , 0 , 1 ], levels = [0.5 , 1.5 ])
1381
- assert len (cs .collections ) == 1
1382
- paths = cs .collections [0 ].get_paths ()
1379
+ paths = cs .get_paths ()
1383
1380
assert len (paths ) == 1
1384
1381
expected_vertices = [[3 , 1 ], [3 , 3 ], [1 , 3 ], [1 , 1 ], [3 , 1 ]]
1385
1382
assert_array_almost_equal (paths [0 ].vertices , expected_vertices )
@@ -1388,8 +1385,7 @@ def test_tricontourf_path():
1388
1385
1389
1386
# Polygon following boundary and inside domain
1390
1387
cs = ax .tricontourf (triang , [1 , 0 , 0 , 0 , 0 ], levels = [0.5 , 1.5 ])
1391
- assert len (cs .collections ) == 1
1392
- paths = cs .collections [0 ].get_paths ()
1388
+ paths = cs .get_paths ()
1393
1389
assert len (paths ) == 1
1394
1390
expected_vertices = [[2 , 0 ], [1 , 1 ], [0 , 2 ], [0 , 0 ], [2 , 0 ]]
1395
1391
assert_array_almost_equal (paths [0 ].vertices , expected_vertices )
@@ -1398,8 +1394,7 @@ def test_tricontourf_path():
1398
1394
1399
1395
# Polygon is outer boundary with hole
1400
1396
cs = ax .tricontourf (triang , [0 , 0 , 0 , 0 , 1 ], levels = [- 0.5 , 0.5 ])
1401
- assert len (cs .collections ) == 1
1402
- paths = cs .collections [0 ].get_paths ()
1397
+ paths = cs .get_paths ()
1403
1398
assert len (paths ) == 1
1404
1399
expected_vertices = [[0 , 0 ], [4 , 0 ], [4 , 4 ], [0 , 4 ], [0 , 0 ],
1405
1400
[1 , 1 ], [1 , 3 ], [3 , 3 ], [3 , 1 ], [1 , 1 ]]
0 commit comments