8000 Merge pull request #6391 from efiring/tick_space · matplotlib/matplotlib@dc6f462 · GitHub
[go: up one dir, main page]

Skip to content

Commit dc6f462

Browse files
committed
Merge pull request #6391 from efiring/tick_space
BUG: remove inactive rotation handling from get_tick_space
2 parents cb5f537 + c2a3a07 commit dc6f462

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/matplotlib/axis.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2002,8 +2002,7 @@ def get_tick_space(self):
20022002
# There is a heuristic here that the aspect ratio of tick text
20032003
# is no more than 3:1
20042004
size = tick.label1.get_size() * 3
2005-
size *= np.cos(np.deg2rad(tick.label1.get_rotation()))
2006-
return np.floor(length / size)
2005+
return int(np.floor(length / size))
20072006

20082007

20092008
class YAxis(Axis):
@@ -2342,5 +2341,4 @@ def get_tick_space(self):
23422341
tick = self._get_tick(True)
23432342
# Having a spacing of at least 2 just looks good.
23442343
size = tick.label1.get_size() * 2.0
2345-
size *= np.cos(np.deg2rad(tick.label1.get_rotation()))
2346-
return np.floor(length / size)
2344+
return int(np.floor(length / size))

0 commit comments

Comments
 (0)
0