@@ -325,7 +325,7 @@ def _init(self):
325325 self ._set_transform ()
326326 with cbook ._setattr_cm (self .Q , pivot = self .pivot [self .labelpos ],
327327 # Hack: save and restore the Umask
328- Umask = ma .nomask ):
328+ _Umask = ma .nomask ):
329329 u = self .U * np .cos (np .radians (self .angle ))
330330 v = self .U * np .sin (np .radians (self .angle ))
331331 self .verts = self .Q ._make_verts ([[0. , 0. ]],
@@ -469,6 +469,7 @@ class Quiver(mcollections.PolyCollection):
469469 """
470470
471471 _PIVOT_VALS = ('tail' , 'middle' , 'tip' )
472+ Umask = _api .deprecate_privatize_attribute ("3.9" )
472473
473474 @_docstring .Substitution (_quiver_doc )
474475 def __init__ (self , ax , * args ,
@@ -769,7 +770,7 @@ def set_XYUVC(self, X=None, Y=None, U=None, V=None, C=None):
769770 C = ma .array (C , mask = mask , copy = False )
770771 self ._U = U .filled (1 )
771772 self ._V = V .filled (1 )
772- self .Umask = mask
773+ self ._Umask = mask
773774 if C is not None :
774775 self .set_array (C )
775776 self ._N = N
@@ -836,8 +837,8 @@ def _make_verts(self, XY, U, V, angles):
836837
837838 if self .scale is None :
838839 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 ()
841842 else :
842843 amean = a .mean ()
843844 # crude auto-scaling
@@ -867,9 +868,9 @@ def _make_verts(self, XY, U, V, angles):
867868 theta = theta .reshape ((- 1 , 1 )) # for broadcasting
868869 xy = (X + Y * 1j ) * np .exp (1j * theta ) * self .width
869870 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 :
871872 XY = ma .array (XY )
872- XY [self .Umask ] = ma .masked
873+ XY [self ._Umask ] = ma .masked
873874 # This might be handled more efficiently with nans, given
874875 # that nans will end up in the paths anyway.
875876
0 commit comments