MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_patch_linestyle_none

Function test_patch_linestyle_none

lib/matplotlib/tests/test_patches.py:399–421  ·  view source on GitHub ↗
(fig_test, fig_ref)

Source from the content-addressed store, hash-verified

397
398@check_figures_equal()
399def test_patch_linestyle_none(fig_test, fig_ref):
400 circle = mpath.Path.unit_circle()
401
402 ax_test = fig_test.add_subplot()
403 ax_ref = fig_ref.add_subplot()
404 for i, ls in enumerate(['none', 'None', ' ', '']):
405 path = mpath.Path(circle.vertices + i, circle.codes)
406 patch = mpatches.PathPatch(path,
407 linewidth=3, linestyle=ls,
408 facecolor=(1, 0, 0),
409 edgecolor=(0, 0, 1))
410 ax_test.add_patch(patch)
411
412 patch = mpatches.PathPatch(path,
413 linewidth=3, linestyle='-',
414 facecolor=(1, 0, 0),
415 edgecolor='none')
416 ax_ref.add_patch(patch)
417
418 ax_test.set_xlim([-1, i + 1])
419 ax_test.set_ylim([-1, i + 1])
420 ax_ref.set_xlim([-1, i + 1])
421 ax_ref.set_ylim([-1, i + 1])
422
423
424def test_wedge_movement():

Callers

nothing calls this directly

Calls 5

unit_circleMethod · 0.80
add_subplotMethod · 0.80
add_patchMethod · 0.80
set_xlimMethod · 0.45
set_ylimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…