(self, all=None, ticks=None, ticklabels=None, label=None)
| 97 | self._axis.set_label_text(txt) |
| 98 | |
| 99 | def toggle(self, all=None, ticks=None, ticklabels=None, label=None): |
| 100 | |
| 101 | if all: |
| 102 | _ticks, _ticklabels, _label = True, True, True |
| 103 | elif all is not None: |
| 104 | _ticks, _ticklabels, _label = False, False, False |
| 105 | else: |
| 106 | _ticks, _ticklabels, _label = None, None, None |
| 107 | |
| 108 | if ticks is not None: |
| 109 | _ticks = ticks |
| 110 | if ticklabels is not None: |
| 111 | _ticklabels = ticklabels |
| 112 | if label is not None: |
| 113 | _label = label |
| 114 | |
| 115 | if _ticks is not None: |
| 116 | tickparam = {f"tick{self._axisnum}On": _ticks} |
| 117 | self._axis.set_tick_params(**tickparam) |
| 118 | if _ticklabels is not None: |
| 119 | tickparam = {f"label{self._axisnum}On": _ticklabels} |
| 120 | self._axis.set_tick_params(**tickparam) |
| 121 | |
| 122 | if _label is not None: |
| 123 | pos = self._axis.get_label_position() |
| 124 | if (pos == self._axis_direction) and not _label: |
| 125 | self._axis.label.set_visible(False) |
| 126 | elif _label: |
| 127 | self._axis.label.set_visible(True) |
| 128 | self._axis.set_label_position(self._axis_direction) |
no test coverage detected