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

Function test_text_stale

lib/matplotlib/tests/test_text.py:508–528  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

506
507
508def test_text_stale():
509 fig, (ax1, ax2) = plt.subplots(1, 2)
510 plt.draw_all()
511 assert not ax1.stale
512 assert not ax2.stale
513 assert not fig.stale
514
515 txt1 = ax1.text(.5, .5, 'aardvark')
516 assert ax1.stale
517 assert txt1.stale
518 assert fig.stale
519
520 ann1 = ax2.annotate('aardvark', xy=[.5, .5])
521 assert ax2.stale
522 assert ann1.stale
523 assert fig.stale
524
525 plt.draw_all()
526 assert not ax1.stale
527 assert not ax2.stale
528 assert not fig.stale
529
530
531@image_comparison(['agg_text_clip.png'], style='mpl20')

Callers

nothing calls this directly

Calls 4

draw_allMethod · 0.80
annotateMethod · 0.80
subplotsMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…