MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / get_tick_space

Method get_tick_space

lib/matplotlib/axis.py:2977–2986  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2975 self.stale = True
2976
2977 def get_tick_space(self):
2978 ends = mtransforms.Bbox.unit().transformed(
2979 self.axes.transAxes - self.get_figure(root=False).dpi_scale_trans)
2980 length = ends.height * 72
2981 # Having a spacing of at least 2 just looks good.
2982 size = self._get_tick_label_size('y') * 2
2983 if size > 0:
2984 return int(np.floor(length / size))
2985 else:
2986 return 2**31 - 1

Callers

nothing calls this directly

Calls 4

unitMethod · 0.80
_get_tick_label_sizeMethod · 0.80
transformedMethod · 0.45
get_figureMethod · 0.45

Tested by

no test coverage detected