Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c7ded09

Browse files
committed
correct the kw passing to Collection from PathCollection
1 parent ff5d36e commit c7ded09

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/matplotlib/collections.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ class _CollectionWithSizes(Collection):
709709
"""
710710
Base class for collections that have an array of sizes.
711711
"""
712-
def __init__(self):
712+
def __init__(self, *arg, **kw):
713+
super(_CollectionWithSizes, self).__init__(*arg, **kw)
713714
self._sizes = np.array([])
714715

715716
def get_sizes(self):
@@ -761,7 +762,8 @@ class _CollectionWithAngles(Collection):
761762
"""
762763
Base class for collections that have an array of angles.
763764
"""
764-
def __init__(self):
765+
def __init__(self, *arg, **kw):
766+
super(_CollectionWithAngles, self).__init__(*arg, **kw)
765767
self._angles = np.array([])
766768

767769
def get_angles(self):
@@ -830,8 +832,7 @@ def __init__(self, paths, sizes=None, angles=None, **kwargs):
830832
831833
%(Collection)s
832834
"""
833-
834-
Collection.__init__(self, **kwargs)
835+
super(PathCollection, self).__init__(**kwargs)
835836
self.set_paths(paths)
836837
self.set_sizes(sizes)
837838
self.set_angles(angles)

0 commit comments

Comments
 (0)