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

Skip to content

Commit e0cfd0c

Browse files
committed
Remove the private Tick._name attribute.
It's only used in two places and is trivially inlined there.
1 parent 110f297 commit e0cfd0c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/matplotlib/axis.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ def __init__(self, axes, loc, label,
9696
self.axes = axes
9797

9898
name = self.__name__.lower()
99-
self._name = name
10099

101100
self._loc = loc
102101

@@ -412,7 +411,7 @@ def _get_text2_transform(self):
412411

413412
def apply_tickdir(self, tickdir):
414413
if tickdir is None:
415-
tickdir = rcParams['%s.direction' % self._name]
414+
tickdir = rcParams['%s.direction' % self.__name__.lower()]
416415
self._tickdir = tickdir
417416

418417
if self._tickdir == 'in':
@@ -528,7 +527,7 @@ def _get_text2_transform(self):
528527

529528
def apply_tickdir(self, tickdir):
530529
if tickdir is None:
531-
tickdir = rcParams['%s.direction' % self._name]
530+
tickdir = rcParams['%s.direction' % self.__name__.lower()]
532531
self._tickdir = tickdir
533532

534533
if self._tickdir == 'in':

0 commit comments

Comments
 (0)