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

Method get_majorticklabels

lib/matplotlib/axis.py:1536–1553  ·  view source on GitHub ↗

Return this Axis' major tick labels, as a list of `~.text.Text`. .. warning:: Ticks and their constituent parts, including tick labels, are not persistent. Various operations can create, delete, and modify the tick instances; see :ref:`axes-tick

(self)

Source from the content-addressed store, hash-verified

1534 return self._pickradius
1535
1536 def get_majorticklabels(self):
1537 """
1538 Return this Axis' major tick labels, as a list of `~.text.Text`.
1539
1540 .. warning::
1541
1542 Ticks and their constituent parts, including tick labels, are not
1543 persistent. Various operations can create, delete, and modify the tick
1544 instances; see :ref:`axes-tick-objects`.
1545
1546 You should generally use `.Axis.set_tick_params` / `.Axis.get_tick_params`
1547 to define and query tick styling; see :ref:`axes-ticks-styling`.
1548 """
1549 self._update_ticks()
1550 ticks = self.get_major_ticks()
1551 labels1 = [tick.label1 for tick in ticks if tick.label1.get_visible()]
1552 labels2 = [tick.label2 for tick in ticks if tick.label2.get_visible()]
1553 return labels1 + labels2
1554
1555 def get_minorticklabels(self):
1556 """

Callers 1

get_ticklabelsMethod · 0.95

Calls 3

_update_ticksMethod · 0.95
get_major_ticksMethod · 0.95
get_visibleMethod · 0.45

Tested by

no test coverage detected