Convenience method for changing the appearance of ticks and tick labels. See `.Axes.tick_params` for full documentation. Because this function applies to 3D Axes, *axis* can also be set to 'z', and setting *axis* to 'both' autoscales all three axes.
(self, axis='both', **kwargs)
| 2079 | self.stale = True |
| 2080 | |
| 2081 | def tick_params(self, axis='both', **kwargs): |
| 2082 | """ |
| 2083 | Convenience method for changing the appearance of ticks and |
| 2084 | tick labels. |
| 2085 | |
| 2086 | See `.Axes.tick_params` for full documentation. Because this function |
| 2087 | applies to 3D Axes, *axis* can also be set to 'z', and setting *axis* |
| 2088 | to 'both' autoscales all three axes. |
| 2089 | |
| 2090 | Also, because of how Axes3D objects are drawn very differently |
| 2091 | from regular 2D Axes, some of these settings may have |
| 2092 | ambiguous meaning. For simplicity, the 'z' axis will |
| 2093 | accept settings as if it was like the 'y' axis. |
| 2094 | |
| 2095 | .. note:: |
| 2096 | Axes3D currently ignores some of these settings. |
| 2097 | """ |
| 2098 | _api.check_in_list(['x', 'y', 'z', 'both'], axis=axis) |
| 2099 | if axis in ['x', 'y', 'both']: |
| 2100 | super().tick_params(axis, **kwargs) |
| 2101 | if axis in ['z', 'both']: |
| 2102 | zkw = dict(kwargs) |
| 2103 | zkw.pop('top', None) |
| 2104 | zkw.pop('bottom', None) |
| 2105 | zkw.pop('labeltop', None) |
| 2106 | zkw.pop('labelbottom', None) |
| 2107 | self.zaxis.set_tick_params(**zkw) |
| 2108 | |
| 2109 | # data limits, ticks, tick labels, and formatting |
| 2110 |