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

Skip to content

Commit 9782f14

Browse files
committed
Inline Axis._MARKER_DICT
This is used only for XTick._apply_tickdir, and YTick._apply_tickdir uses a different dictionary.
1 parent 9b8a8c7 commit 9782f14

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lib/matplotlib/axis.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@
3333
_gridline_param_names = ['grid_' + name
3434
for name in _line_param_names + _line_param_aliases]
3535

36-
_MARKER_DICT = {
37-
'out': (mlines.TICKDOWN, mlines.TICKUP),
38-
'in': (mlines.TICKUP, mlines.TICKDOWN),
39-
'inout': ('|', '|'),
40-
}
41-
4236

4337
class Tick(martist.Artist):
4438
"""
@@ -425,7 +419,11 @@ def _get_text2_transform(self):
425419
def _apply_tickdir(self, tickdir):
426420
# docstring inherited
427421
super()._apply_tickdir(tickdir)
428-
mark1, mark2 = _MARKER_DICT[self._tickdir]
422+
mark1, mark2 = {
423+
'out': (mlines.TICKDOWN, mlines.TICKUP),
424+
'in': (mlines.TICKUP, mlines.TICKDOWN),
425+
'inout': ('|', '|'),
426+
}[self._tickdir]
429427
self.tick1line.set_marker(mark1)
430428
self.tick2line.set_marker(mark2)
431429

0 commit comments

Comments
 (0)