MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / set_ticks_position

Method set_ticks_position

site-packages/matplotlib/axis.py:2004–2034  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 """

Callers 14

tick_topMethod · 0.95
tick_bottomMethod · 0.95
xkcd.pyFile · 0.45
_config_axesMethod · 0.45
config_axisMethod · 0.45
claMethod · 0.45
claMethod · 0.45
claMethod · 0.45
spyMethod · 0.45
matshowMethod · 0.45
test_clipperFunction · 0.45

Calls 1

set_tick_paramsMethod · 0.80

Tested by 4

test_clipperFunction · 0.36
test_label_without_ticksFunction · 0.36
test_title_xticks_topFunction · 0.36