()
| 370 | |
| 371 | |
| 372 | def test_patch_linestyle_accents(): |
| 373 | #: Test if linestyle can also be specified with short mnemonics like "--" |
| 374 | #: c.f. GitHub issue #2136 |
| 375 | star = mpath.Path.unit_regular_star(6) |
| 376 | circle = mpath.Path.unit_circle() |
| 377 | # concatenate the star with an internal cutout of the circle |
| 378 | verts = np.concatenate([circle.vertices, star.vertices[::-1]]) |
| 379 | codes = np.concatenate([circle.codes, star.codes]) |
| 380 | |
| 381 | linestyles = ["-", "--", "-.", ":", |
| 382 | "solid", "dashed", "dashdot", "dotted"] |
| 383 | |
| 384 | fig, ax = plt.subplots() |
| 385 | for i, ls in enumerate(linestyles): |
| 386 | star = mpath.Path(verts + i, codes) |
| 387 | patch = mpatches.PathPatch(star, |
| 388 | linewidth=3, linestyle=ls, |
| 389 | facecolor=(1, 0, 0), |
| 390 | edgecolor=(0, 0, 1)) |
| 391 | ax.add_patch(patch) |
| 392 | |
| 393 | ax.set_xlim([-1, i + 1]) |
| 394 | ax.set_ylim([-1, i + 1]) |
| 395 | fig.canvas.draw() |
| 396 | |
| 397 | |
| 398 | @check_figures_equal() |
nothing calls this directly
no test coverage detected
searching dependent graphs…