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

Method get_ticklabels

lib/matplotlib/axis.py:1574–1612  ·  view source on GitHub ↗

Get this Axis' tick labels. .. 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-objects`. You should ge

(self, minor=False, which=None)

Source from the content-addressed store, hash-verified

1572 return labels1 + labels2
1573
1574 def get_ticklabels(self, minor=False, which=None):
1575 """
1576 Get this Axis' tick labels.
1577
1578 .. warning::
1579
1580 Ticks and their constituent parts, including tick labels, are not
1581 persistent. Various operations can create, delete, and modify the tick
1582 instances; see :ref:`axes-tick-objects`.
1583
1584 You should generally use `.Axis.set_tick_params` / `.Axis.get_tick_params`
1585 to define and query tick styling; see :ref:`axes-ticks-styling`.
1586
1587 Parameters
1588 ----------
1589 minor : bool
1590 Whether to return the minor or the major ticklabels.
1591
1592 which : None, ('minor', 'major', 'both')
1593 Overrides *minor*.
1594
1595 Selects which ticklabels to return
1596
1597 Returns
1598 -------
1599 list of `~matplotlib.text.Text`
1600 """
1601 if which is not None:
1602 if which == 'minor':
1603 return self.get_minorticklabels()
1604 elif which == 'major':
1605 return self.get_majorticklabels()
1606 elif which == 'both':
1607 return self.get_majorticklabels() + self.get_minorticklabels()
1608 else:
1609 _api.check_in_list(['major', 'minor', 'both'], which=which)
1610 if minor:
1611 return self.get_minorticklabels()
1612 return self.get_majorticklabels()
1613
1614 def get_majorticklines(self):
1615 """

Callers 14

get_ref_artistMethod · 0.80
make_rgb_axesFunction · 0.80
rgridsFunction · 0.80
thetagridsFunction · 0.80
set_thetagridsMethod · 0.80
set_rgridsMethod · 0.80
test_colorbar_formatFunction · 0.80
test_tick_label_updateFunction · 0.80
test_polar_gridlinesFunction · 0.80

Calls 2

get_minorticklabelsMethod · 0.95
get_majorticklabelsMethod · 0.95

Tested by 7

test_colorbar_formatFunction · 0.64
test_tick_label_updateFunction · 0.64
test_polar_gridlinesFunction · 0.64