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

Skip to content

Commit 48c9d21

Browse files
committed
Fix some problematic aliases.
1 parent 30dd0c1 commit 48c9d21

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
@@ -1507,17 +1507,11 @@ def set_lineoffset(self, lineoffset):
15071507
self._lineoffset = lineoffset
15081508

15091509
def get_linewidth(self):
1510-
'''
1511-
get the width of the lines used to mark each event
1512-
'''
1513-
return self.get_linewidths()[0]
1510+
"""Get the width of the lines used to mark each event."""
1511+
return super(EventCollection, self).get_linewidth()[0]
15141512

1515-
def get_linestyle(self):
1516-
'''
1517-
get the style of the lines used to mark each event
1518-
[ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
1519-
'''
1520-
return self.get_linestyles()
1513+
def get_linewidths(self):
1514+
return super(EventCollection, self).get_linewidth()
15211515

15221516
def get_color(self):
15231517
'''

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)