| 257 | |
| 258 | |
| 259 | def test_quiverkey_angles(): |
| 260 | # Check that only a single arrow is plotted for a quiverkey when an array |
| 261 | # of angles is given to the original quiver plot |
| 262 | fig, ax = plt.subplots() |
| 263 | |
| 264 | X, Y = np.meshgrid(np.arange(2), np.arange(2)) |
| 265 | U = V = angles = np.ones_like(X) |
| 266 | |
| 267 | q = ax.quiver(X, Y, U, V, angles=angles) |
| 268 | qk = ax.quiverkey(q, 1, 1, 2, 'Label') |
| 269 | # The arrows are only created when the key is drawn |
| 270 | fig.canvas.draw() |
| 271 | assert len(qk.vector.get_paths()) == 1 |
| 272 | |
| 273 | |
| 274 | def test_quiverkey_angles_xy_aitoff(): |