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

Method get_minorticklocs

lib/matplotlib/axis.py:1675–1691  ·  view source on GitHub ↗

Return this Axis' minor tick locations in data coordinates.

(self)

Source from the content-addressed store, hash-verified

1673 return self.major.locator()
1674
1675 def get_minorticklocs(self):
1676 """Return this Axis' minor tick locations in data coordinates."""
1677 # Remove minor ticks duplicating major ticks.
1678 minor_locs = np.asarray(self.minor.locator())
1679 if self.remove_overlapping_locs:
1680 major_locs = self.major.locator()
1681 transform = self._scale.get_transform()
1682 tr_minor_locs = transform.transform(minor_locs)
1683 tr_major_locs = transform.transform(major_locs)
1684 lo, hi = sorted(transform.transform(self.get_view_interval()))
1685 # Use the transformed view limits as scale. 1e-5 is the default
1686 # rtol for np.isclose.
1687 tol = (hi - lo) * 1e-5
1688 mask = np.isclose(tr_minor_locs[:, None], tr_major_locs[None, :],
1689 atol=tol, rtol=0).any(axis=1)
1690 minor_locs = minor_locs[~mask]
1691 return minor_locs
1692
1693 def get_ticklocs(self, *, minor=False):
1694 """

Callers 12

get_tightbboxMethod · 0.95
_update_ticksMethod · 0.95
get_ticklocsMethod · 0.95
get_minor_ticksMethod · 0.95
set_ticklabelsMethod · 0.95
get_ticksMethod · 0.80
_sub_labelsMethod · 0.80
test_remove_overlapFunction · 0.80

Calls 5

get_view_intervalMethod · 0.95
iscloseMethod · 0.80
locatorMethod · 0.45
get_transformMethod · 0.45
transformMethod · 0.45