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

Method get_tick_space

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

Source from the content-addressed store, hash-verified

2745 self.stale = True
2746
2747 def get_tick_space(self):
2748 ends = mtransforms.Bbox.unit().transformed(
2749 self.axes.transAxes - self.get_figure(root=False).dpi_scale_trans)
2750 length = ends.width * 72
2751 # There is a heuristic here that the aspect ratio of tick text
2752 # is no more than 3:1
2753 size = self._get_tick_label_size('x') * 3
2754 if size > 0:
2755 return int(np.floor(length / size))
2756 else:
2757 return 2**31 - 1
2758
2759
2760class YAxis(Axis):

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