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

Skip to content

Commit 3a51240

Browse files
committed
Add test
1 parent 0315c22 commit 3a51240

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

lib/matplotlib/tests/test_text.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,3 +393,14 @@ def test_text_stale():
393393
assert not ax1.stale
394394
assert not ax2.stale
395395
assert not fig.stale
396+
397+
398+
@image_comparison(baseline_images=['agg_text_clip'],
399+
extensions=['png'])
400+
def test_agg_text_clip():
401+
np.random.seed(1)
402+
fig, (ax1, ax2) = plt.subplots(2)
403+
for x, y in np.random.rand(10, 2):
404+
ax1.text(x, y, "foo", clip_on=True)
405+
ax2.text(x, y, "foo")
406+
plt.show()

0 commit comments

Comments
 (0)