()
| 272 | |
| 273 | |
| 274 | def test_marker_as_markerstyle(): |
| 275 | fig, ax = plt.subplots() |
| 276 | line, = ax.plot([2, 4, 3], marker=MarkerStyle("D")) |
| 277 | fig.canvas.draw() |
| 278 | assert line.get_marker() == "D" |
| 279 | |
| 280 | # continue with smoke tests: |
| 281 | line.set_marker("s") |
| 282 | fig.canvas.draw() |
| 283 | line.set_marker(MarkerStyle("o")) |
| 284 | fig.canvas.draw() |
| 285 | # test Path roundtrip |
| 286 | triangle1 = Path._create_closed([[-1, -1], [1, -1], [0, 2]]) |
| 287 | line2, = ax.plot([1, 3, 2], marker=MarkerStyle(triangle1), ms=22) |
| 288 | line3, = ax.plot([0, 2, 1], marker=triangle1, ms=22) |
| 289 | |
| 290 | assert_array_equal(line2.get_marker().vertices, triangle1.vertices) |
| 291 | assert_array_equal(line3.get_marker().vertices, triangle1.vertices) |
| 292 | |
| 293 | |
| 294 | @image_comparison(['striped_line.png'], remove_text=True, style='mpl20') |
nothing calls this directly
no test coverage detected
searching dependent graphs…