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

Function test_streamplot_limits

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

Source from the content-addressed store, hash-verified

161
162
163def test_streamplot_limits():
164 ax = plt.axes()
165 x = np.linspace(-5, 10, 20)
166 y = np.linspace(-2, 4, 10)
167 y, x = np.meshgrid(y, x)
168 trans = mtransforms.Affine2D().translate(25, 32) + ax.transData
169 plt.barbs(x, y, np.sin(x), np.cos(y), transform=trans)
170 # The calculated bounds are approximately the bounds of the original data,
171 # this is because the entire path is taken into account when updating the
172 # datalim.
173 assert_array_almost_equal(ax.dataLim.bounds, (20, 30, 15, 6),
174 decimal=1)
175
176
177def test_streamplot_grid():

Callers

nothing calls this directly

Calls 3

translateMethod · 0.80
barbsMethod · 0.80
axesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…