{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Move x-axis tick labels to the top\n\n`~.axes.Axes.tick_params` can be used to configure the ticks. *top* and\n*labeltop* control the visibility tick lines and labels at the top x-axis.\nTo move x-axis ticks from bottom to top, we have to activate the top ticks\nand deactivate the bottom ticks::\n\n ax.tick_params(top=True, labeltop=True, bottom=False, labelbottom=False)\n\n
If the change should be made for all future plots and not only the current\n Axes, you can adapt the respective config parameters\n\n - :rc:`xtick.top`\n - :rc:`xtick.labeltop`\n - :rc:`xtick.bottom`\n - :rc:`xtick.labelbottom`