Set the ticks position (top, bottom, both, default or none) both sets the ticks to appear on both positions, but does not change the tick labels. 'default' resets the tick positions to the default: ticks on both positions, labels at bottom. 'none' can be us
(self, position)
| 2002 | return above, below |
| 2003 | |
| 2004 | def set_ticks_position(self, position): |
| 2005 | """ |
| 2006 | Set the ticks position (top, bottom, both, default or none) |
| 2007 | both sets the ticks to appear on both positions, but does not |
| 2008 | change the tick labels. 'default' resets the tick positions to |
| 2009 | the default: ticks on both positions, labels at bottom. 'none' |
| 2010 | can be used if you don't want any ticks. 'none' and 'both' |
| 2011 | affect only the ticks, not the labels. |
| 2012 | |
| 2013 | Parameters |
| 2014 | ---------- |
| 2015 | position : {'top', 'bottom', 'both', 'default', 'none'} |
| 2016 | """ |
| 2017 | if position == 'top': |
| 2018 | self.set_tick_params(which='both', top=True, labeltop=True, |
| 2019 | bottom=False, labelbottom=False) |
| 2020 | elif position == 'bottom': |
| 2021 | self.set_tick_params(which='both', top=False, labeltop=False, |
| 2022 | bottom=True, labelbottom=True) |
| 2023 | elif position == 'both': |
| 2024 | self.set_tick_params(which='both', top=True, |
| 2025 | bottom=True) |
| 2026 | elif position == 'none': |
| 2027 | self.set_tick_params(which='both', top=False, |
| 2028 | bottom=False) |
| 2029 | elif position == 'default': |
| 2030 | self.set_tick_params(which='both', top=True, labeltop=False, |
| 2031 | bottom=True, labelbottom=True) |
| 2032 | else: |
| 2033 | raise ValueError("invalid position: %s" % position) |
| 2034 | self.stale = True |
| 2035 | |
| 2036 | def tick_top(self): |
| 2037 | """ |