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

Function test_offsetbox_loc_codes

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

Source from the content-addressed store, hash-verified

90
91
92def test_offsetbox_loc_codes():
93 # Check that valid string location codes all work with an AnchoredOffsetbox
94 codes = {'upper right': 1,
95 'upper left': 2,
96 'lower left': 3,
97 'lower right': 4,
98 'right': 5,
99 'center left': 6,
100 'center right': 7,
101 'lower center': 8,
102 'upper center': 9,
103 'center': 10,
104 }
105 fig, ax = plt.subplots()
106 da = DrawingArea(100, 100)
107 for code in codes:
108 anchored_box = AnchoredOffsetbox(loc=code, child=da)
109 ax.add_artist(anchored_box)
110 fig.canvas.draw()
111
112
113def test_expand_with_tight_layout():

Callers

nothing calls this directly

Calls 5

DrawingAreaClass · 0.90
AnchoredOffsetboxClass · 0.90
subplotsMethod · 0.45
add_artistMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…