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

Skip to content

Commit 7c40fdf

Browse files
committed
Fix some problematic aliases.
1 parent 413144a commit 7c40fdf

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
@@ -1528,17 +1528,11 @@ def set_lineoffset(self, lineoffset):
15281528
self._lineoffset = lineoffset
15291529

15301530
def get_linewidth(self):
1531-
'''
1532-
get the width of the lines used to mark each event
1533-
'''
1534-
return self.get_linewidths()[0]
1531+
"""Get the width of the lines used to mark each event."""
1532+
return super(EventCollection, self).get_linewidth()[0]
15351533

1536-
def get_linestyle(self):
1537-
'''
1538-
get the style of the lines used to mark each event
1539-
[ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
1540-
'''
1541-
return self.get_linestyles()
1534+
def get_linewidths(self):
1535+
return super(EventCollection, self).get_linewidth()
15421536

15431537
def get_color(self):
15441538
'''

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,8 @@ def set_3d_properties(self):
591591
self.update_scalarmappable()
592592
self._sort_zpos = None
593593
self.set_zsort(True)
594-
self._facecolors3d = PolyCollection.get_facecolors(self)
595-
self._edgecolors3d = PolyCollection.get_edgecolors(self)
594+
self._facecolors3d = PolyCollection.get_facecolor(self)
595+
self._edgecolors3d = PolyCollection.get_edgecolor(self)
596596
self._alpha3d = PolyCollection.get_alpha(self)
597597
self.stale = True
598598

@@ -664,12 +664,10 @@ def do_3d_projection(self, renderer):
664664
def set_facecolor(self, colors):
665665
PolyCollection.set_facecolor(self, colors)
666666
self._facecolors3d = PolyCollection.get_facecolor(self)
667-
set_facecolors = set_facecolor
668667

669668
def set_edgecolor(self, colors):
670669
PolyCollection.set_edgecolor(self, colors)
671670
self._edgecolors3d = PolyCollection.get_edgecolor(self)
672-
set_edgecolors = set_edgecolor
673671

674672
def set_alpha(self, alpha):
675673
"""
@@ -696,13 +694,11 @@ def set_alpha(self, alpha):
696694
pass
697695
self.stale = True
698696

699-
def get_facecolors(self):
697+
def get_facecolor(self):
700698
return self._facecolors2d
701-
get_facecolor = get_facecolors
702699

703-
def get_edgecolors(self):
700+
def get_edgecolor(self):
704701
return self._edgecolors2d
705-
get_edgecolor = get_edgecolors
706702

707703
def draw(self, renderer):
708704
return Collection.draw(self, renderer)

0 commit comments

Comments
 (0)