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

Function test_paddedbox

lib/matplotlib/tests/test_offsetbox.py:428–444  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

426
427@image_comparison(['paddedbox.png'], remove_text=True, style='mpl20')
428def test_paddedbox():
429 fig, ax = plt.subplots()
430
431 ta = TextArea("foo")
432 pb = PaddedBox(ta, pad=5, patch_attrs={'facecolor': 'r'}, draw_frame=True)
433 ab = AnchoredOffsetbox('upper left', child=pb)
434 ax.add_artist(ab)
435
436 ta = TextArea("bar")
437 pb = PaddedBox(ta, pad=10, patch_attrs={'facecolor': 'b'})
438 ab = AnchoredOffsetbox('upper right', child=pb)
439 ax.add_artist(ab)
440
441 ta = TextArea("foobar")
442 pb = PaddedBox(ta, pad=15, draw_frame=True)
443 ab = AnchoredOffsetbox('lower right', child=pb)
444 ax.add_artist(ab)
445
446
447def test_remove_draggable():

Callers

nothing calls this directly

Calls 5

TextAreaClass · 0.90
PaddedBoxClass · 0.90
AnchoredOffsetboxClass · 0.90
subplotsMethod · 0.45
add_artistMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…