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

Function test_quiver_limits

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

Source from the content-addressed store, hash-verified

361
362
363def test_quiver_limits():
364 ax = plt.axes()
365 x, y = np.arange(8), np.arange(10)
366 u = v = np.linspace(0, 10, 80).reshape(10, 8)
367 q = plt.quiver(x, y, u, v)
368 assert q.get_datalim(ax.transData).bounds == (0., 0., 7., 9.)
369
370 plt.figure()
371 ax = plt.axes()
372 x = np.linspace(-5, 10, 20)
373 y = np.linspace(-2, 4, 10)
374 y, x = np.meshgrid(y, x)
375 trans = mtransforms.Affine2D().translate(25, 32) + ax.transData
376 plt.quiver(x, y, np.sin(x), np.cos(y), transform=trans)
377 assert ax.dataLim.bounds == (20.0, 30.0, 15.0, 6.0)
378
379
380def test_barb_limits():

Callers

nothing calls this directly

Calls 5

figureMethod · 0.80
translateMethod · 0.80
axesMethod · 0.45
quiverMethod · 0.45
get_datalimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…