(fig_test, fig_ref, gapcolor)
| 1383 | @pytest.mark.parametrize('gapcolor', ['orange', ['r', 'k']]) |
| 1384 | @check_figures_equal() |
| 1385 | def test_striped_lines(fig_test, fig_ref, gapcolor): |
| 1386 | ax_test = fig_test.add_subplot(111) |
| 1387 | ax_ref = fig_ref.add_subplot(111) |
| 1388 | |
| 1389 | for ax in [ax_test, ax_ref]: |
| 1390 | ax.set_xlim(0, 6) |
| 1391 | ax.set_ylim(0, 1) |
| 1392 | |
| 1393 | x = range(1, 6) |
| 1394 | linestyles = [':', '-', '--'] |
| 1395 | |
| 1396 | ax_test.vlines(x, 0, 1, linewidth=20, linestyle=linestyles, gapcolor=gapcolor, |
| 1397 | alpha=0.5) |
| 1398 | |
| 1399 | if isinstance(gapcolor, str): |
| 1400 | gapcolor = [gapcolor] |
| 1401 | |
| 1402 | for x, gcol, ls in zip(x, itertools.cycle(gapcolor), |
| 1403 | itertools.cycle(linestyles)): |
| 1404 | ax_ref.axvline(x, 0, 1, linewidth=20, linestyle=ls, gapcolor=gcol, alpha=0.5) |
| 1405 | |
| 1406 | |
| 1407 | @check_figures_equal(extensions=['png', 'pdf', 'svg', 'eps']) |
nothing calls this directly
no test coverage detected
searching dependent graphs…