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

Skip to content

Commit 5d04619

Browse files
committed
Fix some problematic aliases.
1 parent 5d4d49b commit 5d04619

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

lib/matplotlib/collections.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,17 +1540,11 @@ def set_lineoffset(self, lineoffset):
15401540
self._lineoffset = lineoffset
15411541

15421542
def get_linewidth(self):
1543-
'''
1544-
get the width of the lines used to mark each event
1545-
'''
1546-
return self.get_linewidths()[0]
1543+
"""Get the width of the lines used to mark each event."""
1544+
return super(EventCollection, self).get_linewidth()[0]
15471545

1548-
def get_linestyle(self):
1549-
'''
1550-
get the style of the lines used to mark each event
1551-
[ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
1552-
'''
1553-
return self.get_linestyles()
1546+
def get_linewidths(self):
1547+
return super(EventCollection, self).get_linewidth()
15541548

15551549
def get_color(self):
15561550
'''

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,8 @@ def set_3d_properties(self):
593593
self.update_scalarmappable()
594594
self._sort_zpos = None
595595
self.set_zsort(True)
596-
self._facecolors3d = PolyCollection.get_facecolors(self)
597-
self._edgecolors3d = PolyCollection.get_edgecolors(self)
596+
self._facecolors3d = PolyCollection.get_facecolor(self)
597+
self._edgecolors3d = PolyCollection.get_edgecolor(self)
598598
self._alpha3d = PolyCollection.get_alpha(self)
599599
self.stale = True
600600

@@ -666,12 +666,10 @@ def do_3d_projection(self, renderer):
666666
def set_facecolor(self, colors):
667667
PolyCollection.set_facecolor(self, colors)
668668
self._facecolors3d = PolyCollection.get_facecolor(self)
669-
set_facecolors = set_facecolor
670669

671670
def set_edgecolor(self, colors):
672671
PolyCollection.set_edgecolor(self, colors)
673672
self._edgecolors3d = PolyCollection.get_edgecolor(self)
674-
set_edgecolors = set_edgecolor
675673

676674
def set_alpha(self, alpha):
677675
"""
@@ -698,13 +696,11 @@ def set_alpha(self, alpha):
698696
pass
699697
self.stale = True
700698

701-
def get_facecolors(self):
699+
def get_facecolor(self):
702700
return self._facecolors2d
703-
get_facecolor = get_facecolors
704701

705-
def get_edgecolors(self):
702+
def get_edgecolor(self):
706703
return self._edgecolors2d
707-
get_edgecolor = get_edgecolors
708704

709705
def draw(self, renderer):
710706
return Collection.draw(self, renderer)

0 commit comments

Comments
 (0)