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

Skip to content

Commit baa041e

Browse files
committed
Add test for issue matplotlib#566
1 parent 5be9f92 commit baa041e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,21 @@ def test_markevery_line():
628628
ax.plot(x, y, '-+', markevery=(5, 20), label='mark every 5 starting at 10')
629629
ax.legend()
630630

631+
def test_annotation_failure():
632+
"""See issue #566"""
633+
import cStringIO
634+
plt.plot([1, 2, 3, 4], [0, -1, -2, 8])
635+
plt.annotate("Blah", xy=(2, 2), xytext=(-20,-20),
636+
textcoords='offset points',
637+
bbox=dict(boxstyle='round,pad=0.5'),
638+
arrowprops=dict(arrowstyle='fancy',
639+
connectionstyle='arc3,rad=0'))
640+
641+
plt.savefig(cStringIO.StringIO())
642+
631643

632644
if __name__=='__main__':
633645
import nose
634646
nose.runmodule(argv=['-s','--with-doctest'], exit=False)
647+
648+

0 commit comments

Comments
 (0)