@@ -325,7 +325,7 @@ def _init(self):
325
325
self ._set_transform ()
326
326
with cbook ._setattr_cm (self .Q , pivot = self .pivot [self .labelpos ],
327
327
# Hack: save and restore the Umask
328
- Umask = ma .nomask ):
328
+ _Umask = ma .nomask ):
329
329
u = self .U * np .cos (np .radians (self .angle ))
330
330
v = self .U * np .sin (np .radians (self .angle ))
331
331
self .verts = self .Q ._make_verts ([[0. , 0. ]],
@@ -469,6 +469,7 @@ class Quiver(mcollections.PolyCollection):
469
469
"""
470
470
471
471
_PIVOT_VALS = ('tail' , 'middle' , 'tip' )
472
+ Umask = _api .deprecate_privatize_attribute ("3.9" )
472
473
473
474
@_docstring .Substitution (_quiver_doc )
474
475
def __init__ (self , ax , * args ,
@@ -769,7 +770,7 @@ def set_XYUVC(self, X=None, Y=None, U=None, V=None, C=None):
769
770
C = ma .array (C , mask = mask , copy = False )
770
771
self ._U = U .filled (1 )
771
772
self ._V = V .filled (1 )
772
- self .Umask = mask
773
+ self ._Umask = mask
773
774
if C is not None :
774
775
self .set_array (C )
775
776
self ._N = N
@@ -836,8 +837,8 @@ def _make_verts(self, XY, U, V, angles):
836
837
837
838
if self .scale is None :
838
839
sn = max (10 , math .sqrt (len (self .get_offsets ())))
839
- if self .Umask is not ma .nomask :
840
- amean = a [~ self .Umask ].mean ()
840
+ if self ._Umask is not ma .nomask :
841
+ amean = a [~ self ._Umask ].mean ()
841
842
else :
842
843
amean = a .mean ()
843
844
# crude auto-scaling
@@ -867,9 +868,9 @@ def _make_verts(self, XY, U, V, angles):
867
868
theta = theta .reshape ((- 1 , 1 )) # for broadcasting
868
869
xy = (X + Y * 1j ) * np .exp (1j * theta ) * self .width
869
870
XY = np .stack ((xy .real , xy .imag ), axis = 2 )
870
- if self .Umask is not ma .nomask :
871
+ if self ._Umask is not ma .nomask :
871
872
XY = ma .array (XY )
872
- XY [self .Umask ] = ma .masked
873
+ XY [self ._Umask ] = ma .masked
873
874
# This might be handled more efficiently with nans, given
874
875
# that nans will end up in the paths anyway.
875
876
0 commit comments