Skip to content

Commit f7c1c3a

Browse files
committed
MNT : simplfied property over-ride code in Line2D
1 parent 9d277fe commit f7c1c3a

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

lib/matplotlib/lines.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -536,19 +536,11 @@ def get_window_extent(self, renderer):
536536
bbox = bbox.padded(ms)
537537
return bbox
538538

539-
@property
540-
def axes(self):
541-
"""
542-
The axes this artist belongs to
543-
"""
544-
# call the get method on the parents' property
545-
return Artist.axes.fget(self)
546-
547-
@axes.setter
539+
@Artist.axes.setter
548540
def axes(self, ax):
549-
# call the get method on the parents' property
541+
# call the set method from the base-class property
550542
Artist.axes.fset(self, ax)
551-
# unit-related call backs
543+
# connect unit-related callbacks
552544
if ax.xaxis is not None:
553545
self._xcid = ax.xaxis.callbacks.connect('units',
554546
self.recache_always)

0 commit comments

Comments
 (0)