Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b79174 commit 874ccddCopy full SHA for 874ccdd
1 file changed
lib/matplotlib/axis.py
@@ -2020,7 +2020,10 @@ def get_tick_space(self):
2020
# There is a heuristic here that the aspect ratio of tick text
2021
# is no more than 3:1
2022
size = tick.label1.get_size() * 3
2023
- return int(np.floor(length / size))
+ if size > 0:
2024
+ return int(np.floor(length / size))
2025
+ else:
2026
+ return 2**31 - 1
2027
2028
2029
class YAxis(Axis):
@@ -2353,4 +2356,7 @@ def get_tick_space(self):
2353
2356
tick = self._get_tick(True)
2354
2357
# Having a spacing of at least 2 just looks good.
2355
2358
size = tick.label1.get_size() * 2.0
2359
2360
2361
2362
0 commit comments