Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 831498d

Browse files
committed
ENH: Add test for barbs pivot functionality
1 parent 3f1adf5 commit 831498d

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

20.8 KB
Loading

lib/matplotlib/tests/test_quiver.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,18 @@ def test_barbs():
142142
cmap='viridis')
143143

144144

145+
@image_comparison(baseline_images=['barbs_pivot_test_image'],
146+
extensions=['png'], remove_text=True)
147+
def test_barbs_pivot():
148+
x = np.linspace(-5, 5, 5)
149+
X, Y = np.meshgrid(x, x)
150+
U, V = 12*X, 12*Y
151+
fig, ax = plt.subplots()
152+
ax.barbs(X, Y, U, V, fill_empty=True, rounding=False, pivot=1.7,
153+
sizes=dict(emptybarb=0.25, spacing=0.2, height=0.3))
154+
ax.scatter(X, Y, s=49, c='black')
155+
156+
145157
def test_bad_masked_sizes():
146158
'Test error handling when given differing sized masked arrays'
147159
x = np.arange(3)

0 commit comments

Comments
 (0)