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

Function draw_quiverkey_setzorder

lib/matplotlib/tests/test_quiver.py:365–382  ·  view source on GitHub ↗

Draw Quiver and QuiverKey using set_zorder

(fig, zorder=None)

Source from the content-addressed store, hash-verified

363
364
365def draw_quiverkey_setzorder(fig, zorder=None):
366 """Draw Quiver and QuiverKey using set_zorder"""
367 x = np.arange(1, 6, 1)
368 y = np.arange(1, 6, 1)
369 X, Y = np.meshgrid(x, y)
370 U, V = 2, 2
371
372 ax = fig.subplots()
373 q = ax.quiver(X, Y, U, V, pivot='middle')
374 ax.set_xlim(0.5, 5.5)
375 ax.set_ylim(0.5, 5.5)
376 qk1 = ax.quiverkey(q, 4, 4, 25, coordinates='data',
377 label='U', color='blue')
378 qk2 = ax.quiverkey(q, 5.5, 2, 20, coordinates='data',
379 label='V', color='blue', angle=90)
380 if zorder is not None:
381 qk1.set_zorder(zorder)
382 qk2.set_zorder(zorder)
383
384
385@pytest.mark.parametrize('zorder', [0, 2, 5, None])

Callers 1

test_quiverkey_zorderFunction · 0.85

Calls 6

quiverkeyMethod · 0.80
subplotsMethod · 0.45
quiverMethod · 0.45
set_xlimMethod · 0.45
set_ylimMethod · 0.45
set_zorderMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…