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

Function test_boxarrow

lib/matplotlib/tests/test_arrow_patches.py:32–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30
31@image_comparison(['boxarrow_test_image.png'], style='mpl20')
32def test_boxarrow():
33
34 styles = mpatches.BoxStyle.get_styles()
35
36 n = len(styles)
37 spacing = 1.2
38
39 figheight = (n * spacing + .5)
40 fig = plt.figure(figsize=(4 / 1.5, figheight / 1.5))
41
42 fontsize = 0.3 * 72
43
44 for i, stylename in enumerate(sorted(styles)):
45 fig.text(0.5, ((n - i) * spacing - 0.5)/figheight, stylename,
46 ha="center",
47 size=fontsize,
48 transform=fig.transFigure,
49 bbox=dict(boxstyle=stylename, fc="w", ec="k"))
50
51
52@image_comparison(['boxarrow_adjustment_test_image.png'], style='mpl20')

Callers

nothing calls this directly

Calls 3

get_stylesMethod · 0.80
figureMethod · 0.80
textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…