Set tick locations. Parameters ---------- ticks : 1D array-like List of tick locations. labels : list of str, optional List of tick labels. If not set, the labels show the data value. minor : bool, default: False I
(self, ticks, *, labels=None, minor=False, **kwargs)
| 889 | _log.debug('locator: %r', locator) |
| 890 | |
| 891 | def set_ticks(self, ticks, *, labels=None, minor=False, **kwargs): |
| 892 | """ |
| 893 | Set tick locations. |
| 894 | |
| 895 | Parameters |
| 896 | ---------- |
| 897 | ticks : 1D array-like |
| 898 | List of tick locations. |
| 899 | labels : list of str, optional |
| 900 | List of tick labels. If not set, the labels show the data value. |
| 901 | minor : bool, default: False |
| 902 | If ``False``, set the major ticks; if ``True``, the minor ticks. |
| 903 | **kwargs |
| 904 | `.Text` properties for the labels. These take effect only if you |
| 905 | pass *labels*. In other cases, please use `~.Axes.tick_params`. |
| 906 | """ |
| 907 | if np.iterable(ticks): |
| 908 | self.long_axis.set_ticks(ticks, labels=labels, minor=minor, |
| 909 | **kwargs) |
| 910 | self._locator = self.long_axis.get_major_locator() |
| 911 | else: |
| 912 | self._locator = ticks |
| 913 | self.long_axis.set_major_locator(self._locator) |
| 914 | self.stale = True |
| 915 | |
| 916 | def get_ticks(self, minor=False): |
| 917 | """ |
no test coverage detected