MCPcopy
hub / github.com/matplotlib/matplotlib / test_maxlength

Function test_maxlength

lib/matplotlib/tests/test_streamplot.py:72–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70@image_comparison(['streamplot_maxlength.png'],
71 remove_text=True, style='mpl20', tol=0.302)
72def test_maxlength():
73 x, y, U, V = swirl_velocity_field()
74 ax = plt.figure().subplots()
75 ax.streamplot(x, y, U, V, maxlength=10., start_points=[[0., 1.5]],
76 linewidth=2, density=2)
77 assert ax.get_xlim()[-1] == ax.get_ylim()[-1] == 3
78 # Compatibility for old test image
79 ax.set(xlim=(None, 3.2555988021882305), ylim=(None, 3.078326760195413))
80
81
82@image_comparison(['streamplot_maxlength_no_broken.png'],

Callers

nothing calls this directly

Calls 6

swirl_velocity_fieldFunction · 0.85
figureMethod · 0.80
subplotsMethod · 0.45
get_xlimMethod · 0.45
get_ylimMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…