()
| 924 | |
| 925 | @mpl3d_image_comparison(['quiver3d_masked.png'], style='mpl20') |
| 926 | def test_quiver3d_masked(): |
| 927 | fig = plt.figure() |
| 928 | ax = fig.add_subplot(projection='3d') |
| 929 | |
| 930 | # Using mgrid here instead of ogrid because masked_where doesn't |
| 931 | # seem to like broadcasting very much... |
| 932 | x, y, z = np.mgrid[-1:0.8:10j, -1:0.8:10j, -1:0.6:3j] |
| 933 | |
| 934 | u = np.sin(np.pi * x) * np.cos(np.pi * y) * np.cos(np.pi * z) |
| 935 | v = -np.cos(np.pi * x) * np.sin(np.pi * y) * np.cos(np.pi * z) |
| 936 | w = (2/3)**0.5 * np.cos(np.pi * x) * np.cos(np.pi * y) * np.sin(np.pi * z) |
| 937 | u = np.ma.masked_where((-0.4 < x) & (x < 0.1), u, copy=False) |
| 938 | v = np.ma.masked_where((0.1 < y) & (y < 0.7), v, copy=False) |
| 939 | |
| 940 | ax.quiver(x, y, z, u, v, w, length=0.1, pivot='tip', normalize=True) |
| 941 | |
| 942 | |
| 943 | @mpl3d_image_comparison(['quiver3d_colorcoded.png'], style='mpl20') |
nothing calls this directly
no test coverage detected
searching dependent graphs…