Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad81c4b

Browse files
author
apodemus
committed
add image test
1 parent e1f863e commit ad81c4b

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

82.5 KB
Loading

lib/matplotlib/tests/test_patches.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,3 +626,16 @@ def test_default_capstyle():
626626
def test_default_joinstyle():
627627
patch = Patch()
628628
assert patch.get_joinstyle() == 'miter'
629+
630+
631+
@image_comparison(baseline_images=['annulus'], extensions=['png'])
632+
def test_annulus():
633+
from matplotlib.patches import Annulus
634+
635+
fig, ax = plt.subplots()
636+
cir = Annulus((0.5, 0.5), 0.2, 0.05, fc='g') # circular annulus
637+
ell = Annulus((0.5, 0.5), (0.5, 0.3), 0.1, 45, # elliptical
638+
fc='m', ec='b', alpha=0.5, hatch='xxx')
639+
ax.add_patch(cir)
640+
ax.add_patch(ell)
641+
ax.set_aspect('equal')

0 commit comments

Comments
 (0)