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

Function test_barb_limits

lib/matplotlib/tests/test_collections.py:380–391  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

378
379
380def test_barb_limits():
381 ax = plt.axes()
382 x = np.linspace(-5, 10, 20)
383 y = np.linspace(-2, 4, 10)
384 y, x = np.meshgrid(y, x)
385 trans = mtransforms.Affine2D().translate(25, 32) + ax.transData
386 plt.barbs(x, y, np.sin(x), np.cos(y), transform=trans)
387 # The calculated bounds are approximately the bounds of the original data,
388 # this is because the entire path is taken into account when updating the
389 # datalim.
390 assert_array_almost_equal(ax.dataLim.bounds, (20, 30, 15, 6),
391 decimal=1)
392
393
394@image_comparison(['EllipseCollection_test_image.png'], remove_text=True,

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…