Test barbs with an array for flip_barb.
()
| 203 | |
| 204 | @image_comparison(['barbs_test_flip.png'], remove_text=True, style='_classic_test') |
| 205 | def test_barbs_flip(): |
| 206 | """Test barbs with an array for flip_barb.""" |
| 207 | x = np.linspace(-5, 5, 5) |
| 208 | X, Y = np.meshgrid(x, x) |
| 209 | U, V = 12*X, 12*Y |
| 210 | fig, ax = plt.subplots() |
| 211 | ax.barbs(X, Y, U, V, fill_empty=True, rounding=False, pivot=1.7, |
| 212 | sizes=dict(emptybarb=0.25, spacing=0.2, height=0.3), |
| 213 | flip_barb=Y < 0) |
| 214 | |
| 215 | |
| 216 | def test_barb_copy(): |