\n",
+ "
matplotlib.pyplot.xticks
def xticks(ticks=None, labels=None, *, minor=False, **kwargs)
/usr/local/lib/python3.10/dist-packages/matplotlib/pyplot.pyGet or set the current tick locations and labels of the x-axis.\n",
+ "\n",
+ "Pass no arguments to return the current values without modifying them.\n",
+ "\n",
+ "Parameters\n",
+ "----------\n",
+ "ticks : array-like, optional\n",
+ " The list of xtick locations. Passing an empty list removes all xticks.\n",
+ "labels : array-like, optional\n",
+ " The labels to place at the given *ticks* locations. This argument can\n",
+ " only be passed if *ticks* is passed as well.\n",
+ "minor : bool, default: False\n",
+ " If ``False``, get/set the major ticks/labels; if ``True``, the minor\n",
+ " ticks/labels.\n",
+ "**kwargs\n",
+ " `.Text` properties can be used to control the appearance of the labels.\n",
+ "\n",
+ "Returns\n",
+ "-------\n",
+ "locs\n",
+ " The list of xtick locations.\n",
+ "labels\n",
+ " The list of xlabel `.Text` objects.\n",
+ "\n",
+ "Notes\n",
+ "-----\n",
+ "Calling this function with no arguments (e.g. ``xticks()``) is the pyplot\n",
+ "equivalent of calling `~.Axes.get_xticks` and `~.Axes.get_xticklabels` on\n",
+ "the current axes.\n",
+ "Calling this function with arguments is the pyplot equivalent of calling\n",
+ "`~.Axes.set_xticks` and `~.Axes.set_xticklabels` on the current axes.\n",
+ "\n",
+ "Examples\n",
+ "--------\n",
+ ">>> locs, labels = xticks() # Get the current locations and labels.\n",
+ ">>> xticks(np.arange(0, 1, step=0.2)) # Set label locations.\n",
+ ">>> xticks(np.arange(3), ['Tom', 'Dick', 'Sue']) # Set text labels.\n",
+ ">>> xticks([0, 1, 2], ['January', 'February', 'March'],\n",
+ "... rotation=20) # Set text labels and properties.\n",
+ ">>> xticks([]) # Disable xticks.
\n",
+ " \n",
+ "
"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 5
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "