19
19
20
20
import numpy as np
21
21
from numpy import ma
22
- import matplotlib .collections as collections
22
+ import matplotlib .collections as mcollections
23
23
import matplotlib .transforms as transforms
24
24
import matplotlib .text as mtext
25
25
import matplotlib .artist as martist
@@ -276,7 +276,7 @@ def _init(self):
276
276
self .Q .pivot = _pivot
277
277
kw = self .Q .polykw
278
278
kw .update (self .kw )
279
- self .vector = collections .PolyCollection (
279
+ self .vector = mcollections .PolyCollection (
280
280
self .verts ,
281
281
offsets = [(self .X , self .Y )],
282
282
transOffset = self .get_transform (),
@@ -365,7 +365,7 @@ def _parse_args(*args):
365
365
return X , Y , U , V , C
366
366
367
367
368
- class Quiver (collections .PolyCollection ):
368
+ class Quiver (mcollections .PolyCollection ):
369
369
"""
370
370
Specialized PolyCollection for arrows.
371
371
@@ -412,7 +412,7 @@ def __init__(self, ax, *args, **kw):
412
412
self .transform = kw .pop ('transform' , ax .transData )
413
413
kw .setdefault ('facecolors' , self .color )
414
414
kw .setdefault ('linewidths' , (0 ,))
415
- collections .PolyCollection .__init__ (self , [], offsets = self .XY ,
415
+ mcollections .PolyCollection .__init__ (self , [], offsets = self .XY ,
416
416
transOffset = self .transform ,
417
417
closed = False ,
418
418
** kw )
@@ -446,7 +446,7 @@ def remove(self):
446
446
self .ax .figure .callbacks .disconnect (self ._cid )
447
447
self ._cid = None
448
448
# pass the remove call up the stack
449
- collections .PolyCollection .remove (self )
449
+ mcollections .PolyCollection .remove (self )
450
450
451
451
def _init (self ):
452
452
"""
@@ -473,7 +473,7 @@ def draw(self, renderer):
473
473
verts = self ._make_verts (self .U , self .V )
474
474
self .set_verts (verts , closed = False )
475
475
self ._new_UV = False
476
- collections .PolyCollection .draw (self , renderer )
476
+ mcollections .PolyCollection .draw (self , renderer )
477
477
478
478
def set_UVC (self , U , V , C = None ):
479
479
U = ma .masked_invalid (U , copy = False ).ravel ()
@@ -806,7 +806,7 @@ def _h_arrows(self, length):
806
806
docstring .interpd .update (barbs_doc = _barbs_doc )
807
807
808
808
809
- class Barbs (collections .PolyCollection ):
809
+ class Barbs (mcollections .PolyCollection ):
810
810
'''
811
811
Specialized PolyCollection for barbs.
812
812
@@ -867,7 +867,7 @@ def __init__(self, ax, *args, **kw):
867
867
868
868
#Make a collection
869
869
barb_size = self ._length ** 2 / 4 # Empirically determined
870
- collections .PolyCollection .__init__ (self , [], (barb_size ,), offsets = xy ,
870
+ mcollections .PolyCollection .__init__ (self , [], (barb_size ,), offsets = xy ,
871
871
transOffset = transform , ** kw )
872
872
self .set_transform (transforms .IdentityTransform ())
873
873
@@ -1091,7 +1091,7 @@ def set_offsets(self, xy):
1091
1091
x , y , u , v = delete_masked_points (self .x .ravel (), self .y .ravel (),
1092
1092
self .u , self .v )
1093
1093
xy = np .hstack ((x [:, np .newaxis ], y [:, np .newaxis ]))
1094
- collections .PolyCollection .set_offsets (self , xy )
1095
- set_offsets .__doc__ = collections .PolyCollection .set_offsets .__doc__
1094
+ mcollections .PolyCollection .set_offsets (self , xy )
1095
+ set_offsets .__doc__ = mcollections .PolyCollection .set_offsets .__doc__
1096
1096
1097
1097
barbs_doc = _barbs_doc
0 commit comments