We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aaa3216 commit 4b6112eCopy full SHA for 4b6112e
examples/pylab_examples/quiver_demo.py
@@ -75,8 +75,13 @@
75
# 6
76
plt.figure()
77
M = np.zeros(U.shape, dtype='bool')
78
-M[U.shape[0]/3:2*U.shape[0]/3,
79
- U.shape[1]/3:2*U.shape[1]/3] = True
+XMaskStart = int(U.shape[0]/3)
+YMaskStart = int(U.shape[1]/3)
80
+XMaskStop = int(2*U.shape[0]/3)
81
+YMaskStop = int(2*U.shape[1]/3)
82
+
83
+M[XMaskStart:XMaskStop,
84
+ YMaskStart:YMaskStop] = True
85
U = ma.masked_array(U, mask=M)
86
V = ma.masked_array(V, mask=M)
87
Q = plt.quiver(U, V)
0 commit comments