Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 97b3985

Browse filesBrowse files
committed
Address comments in PR
1 parent 62804e8 commit 97b3985
Copy full SHA for 97b3985

File tree

Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed

‎lib/matplotlib/axis.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axis.py
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,12 @@ def get_tick_padding(self):
176176
"""
177177
Get the length of the tick outside of the axes.
178178
"""
179-
tickdir = self._tickdir
180-
if tickdir == 'in':
181-
return 0.0
182-
elif tickdir == 'inout':
183-
return self._size / 2
184-
elif tickdir == 'out':
185-
return self._size
179+
padding = {
180+
'in': 0.0,
181+
'inout': 0.5,
182+
'out': 1.0
183+
}
184+
return self._size * padding[self._tickdir]
186185

187186
def get_children(self):
188187
children = [self.tick1line, self.tick2line,
@@ -1109,7 +1108,8 @@ def get_tightbbox(self, renderer):
11091108
return None
11101109

11111110
def get_tick_padding(self):
1112-
return self.majorTicks[0].get_tick_padding()
1111+
return max(self.majorTicks[0].get_tick_padding(),
1112+
self.minorTicks[0].get_tick_padding())
11131113

11141114
@allow_rasterization
11151115
def draw(self, renderer, *args, **kwargs):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.