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

Function draw_quiverkey_zorder_argument

lib/matplotlib/tests/test_quiver.py:342–362  ·  view source on GitHub ↗

Draw Quiver and QuiverKey using zorder argument

(fig, zorder=None)

Source from the content-addressed store, hash-verified

340
341
342def draw_quiverkey_zorder_argument(fig, zorder=None):
343 """Draw Quiver and QuiverKey using zorder argument"""
344 x = np.arange(1, 6, 1)
345 y = np.arange(1, 6, 1)
346 X, Y = np.meshgrid(x, y)
347 U, V = 2, 2
348
349 ax = fig.subplots()
350 q = ax.quiver(X, Y, U, V, pivot='middle')
351 ax.set_xlim(0.5, 5.5)
352 ax.set_ylim(0.5, 5.5)
353 if zorder is None:
354 ax.quiverkey(q, 4, 4, 25, coordinates='data',
355 label='U', color='blue')
356 ax.quiverkey(q, 5.5, 2, 20, coordinates='data',
357 label='V', color='blue', angle=90)
358 else:
359 ax.quiverkey(q, 4, 4, 25, coordinates='data',
360 label='U', color='blue', zorder=zorder)
361 ax.quiverkey(q, 5.5, 2, 20, coordinates='data',
362 label='V', color='blue', angle=90, zorder=zorder)
363
364
365def draw_quiverkey_setzorder(fig, zorder=None):

Callers 1

test_quiverkey_zorderFunction · 0.85

Calls 5

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…