Set if axes spine and labels are drawn at top or bottom (or left/right) of the Axes. Parameters ---------- align : {'top', 'bottom', 'left', 'right'} Either 'top' or 'bottom' for orientation='x' or 'left' or 'right' for orientation='y
(self, align)
| 59 | self.set_alignment(self._locstrings[0]) |
| 60 | |
| 61 | def set_alignment(self, align): |
| 62 | """ |
| 63 | Set if axes spine and labels are drawn at top or bottom (or left/right) |
| 64 | of the Axes. |
| 65 | |
| 66 | Parameters |
| 67 | ---------- |
| 68 | align : {'top', 'bottom', 'left', 'right'} |
| 69 | Either 'top' or 'bottom' for orientation='x' or |
| 70 | 'left' or 'right' for orientation='y' axis. |
| 71 | """ |
| 72 | _api.check_in_list(self._locstrings, align=align) |
| 73 | if align == self._locstrings[1]: # Need to change the orientation. |
| 74 | self._locstrings = self._locstrings[::-1] |
| 75 | self.spines[self._locstrings[0]].set_visible(True) |
| 76 | self.spines[self._locstrings[1]].set_visible(False) |
| 77 | self._axis.set_ticks_position(align) |
| 78 | self._axis.set_label_position(align) |
| 79 | |
| 80 | def set_location(self, location, transform=None): |
| 81 | """ |