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

Method get_major_ticks

lib/matplotlib/axis.py:1792–1816  ·  view source on GitHub ↗

r""" Return the list of major `.Tick`\s. .. warning:: Ticks are not guaranteed to be persistent. Various operations can create, delete and modify the Tick instances. There is an imminent risk that changes to individual ticks will not

(self, numticks=None)

Source from the content-addressed store, hash-verified

1790 return self.minor.formatter
1791
1792 def get_major_ticks(self, numticks=None):
1793 r"""
1794 Return the list of major `.Tick`\s.
1795
1796 .. warning::
1797
1798 Ticks are not guaranteed to be persistent. Various operations
1799 can create, delete and modify the Tick instances. There is an
1800 imminent risk that changes to individual ticks will not
1801 survive if you work on the figure further (including also
1802 panning/zooming on a displayed figure).
1803
1804 Working on the individual ticks is a method of last resort.
1805 Use `.set_tick_params` instead if possible.
1806 """
1807 if numticks is None:
1808 numticks = len(self.get_majorticklocs())
1809
1810 while len(self.majorTicks) < numticks:
1811 # Update the new tick label properties from the old.
1812 tick = self._get_tick(major=True)
1813 self.majorTicks.append(tick)
1814 self._copy_tick_props(self.majorTicks[0], tick)
1815
1816 return self.majorTicks[:numticks]
1817
1818 def get_minor_ticks(self, numticks=None):
1819 r"""

Callers 15

get_childrenMethod · 0.95
_update_ticksMethod · 0.95
get_gridlinesMethod · 0.95
get_majorticklabelsMethod · 0.95
get_majorticklinesMethod · 0.95
get_ticks_directionMethod · 0.95
set_ticklabelsMethod · 0.95
_set_tick_locationsMethod · 0.95
test_url_tickFunction · 0.45
test_grid_rcparamsFunction · 0.45
check_tick1_visibleFunction · 0.45

Calls 3

get_majorticklocsMethod · 0.95
_get_tickMethod · 0.95
_copy_tick_propsMethod · 0.95