You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Applications are open for the 2018 John Hunter Matplotlib Summer Fellowship. Apply now!
Version 2.2.2.post1705+gc85f8217d
matplotlib
Fork me on GitHub

Table Of Contents

matplotlib.axis.XAxis.set_ticks_position

XAxis.set_ticks_position(position)[source]

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 used if you don't want any ticks. 'none' and 'both' affect only the ticks, not the labels.

Parameters:
position : {'top', 'bottom', 'both', 'default', 'none'}

Examples using matplotlib.axis.XAxis.set_ticks_position