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

Function test_zero_headlength

lib/matplotlib/tests/test_quiver.py:94–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92
93
94def test_zero_headlength():
95 # Based on report by Doug McNeil:
96 # https://discourse.matplotlib.org/t/quiver-warnings/16722
97 fig, ax = plt.subplots()
98 X, Y = np.meshgrid(np.arange(10), np.arange(10))
99 U, V = np.cos(X), np.sin(Y)
100 ax.quiver(U, V, headlength=0, headaxislength=0)
101 fig.canvas.draw() # Check that no warning is emitted.
102
103
104@image_comparison(['quiver_animated_test_image.png'], style='mpl20')

Callers

nothing calls this directly

Calls 3

subplotsMethod · 0.45
quiverMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…