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)
| 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 | """ |