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

Function test_connection_styles

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

Source from the content-addressed store, hash-verified

193@image_comparison(['connection_styles.png'], style='mpl20', remove_text=True,
194 tol=0 if platform.machine() == 'x86_64' else 0.013)
195def test_connection_styles():
196 styles = mpatches.ConnectionStyle.get_styles()
197
198 n = len(styles)
199 fig, ax = plt.subplots(figsize=(6, 10))
200 ax.set_xlim(0, 1)
201 ax.set_ylim(-1, n)
202
203 for i, stylename in enumerate(sorted(styles)):
204 patch = mpatches.FancyArrowPatch((0.1, i), (0.8, i + 0.5),
205 arrowstyle="->",
206 connectionstyle=stylename,
207 mutation_scale=25)
208 ax.add_patch(patch)
209
210
211def test_invalid_intersection():

Callers

nothing calls this directly

Calls 5

get_stylesMethod · 0.80
add_patchMethod · 0.80
subplotsMethod · 0.45
set_xlimMethod · 0.45
set_ylimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…