Set the ticks position. Parameters ---------- position : {'top', 'bottom', 'both', 'default', 'none'} 'both' sets the ticks to appear on both positions, but does not change the tick labels. 'default' resets the tick positions to
(self, position)
| 2653 | self.offsetText.set_position((x, y)) |
| 2654 | |
| 2655 | def set_ticks_position(self, position): |
| 2656 | """ |
| 2657 | Set the ticks position. |
| 2658 | |
| 2659 | Parameters |
| 2660 | ---------- |
| 2661 | position : {'top', 'bottom', 'both', 'default', 'none'} |
| 2662 | 'both' sets the ticks to appear on both positions, but does not |
| 2663 | change the tick labels. 'default' resets the tick positions to |
| 2664 | the default: ticks on both positions, labels at bottom. 'none' |
| 2665 | can be used if you don't want any ticks. 'none' and 'both' |
| 2666 | affect only the ticks, not the labels. |
| 2667 | """ |
| 2668 | if position == 'top': |
| 2669 | self.set_tick_params(which='both', top=True, labeltop=True, |
| 2670 | bottom=False, labelbottom=False) |
| 2671 | self._tick_position = 'top' |
| 2672 | self.offsetText.set_verticalalignment('bottom') |
| 2673 | elif position == 'bottom': |
| 2674 | self.set_tick_params(which='both', top=False, labeltop=False, |
| 2675 | bottom=True, labelbottom=True) |
| 2676 | self._tick_position = 'bottom' |
| 2677 | self.offsetText.set_verticalalignment('top') |
| 2678 | elif position == 'both': |
| 2679 | self.set_tick_params(which='both', top=True, |
| 2680 | bottom=True) |
| 2681 | elif position == 'none': |
| 2682 | self.set_tick_params(which='both', top=False, |
| 2683 | bottom=False) |
| 2684 | elif position == 'default': |
| 2685 | self.set_tick_params(which='both', top=True, labeltop=False, |
| 2686 | bottom=True, labelbottom=True) |
| 2687 | self._tick_position = 'bottom' |
| 2688 | self.offsetText.set_verticalalignment('top') |
| 2689 | else: |
| 2690 | _api.check_in_list(['top', 'bottom', 'both', 'default', 'none'], |
| 2691 | position=position) |
| 2692 | self.stale = True |
| 2693 | |
| 2694 | def tick_top(self): |
| 2695 | """ |