Version 3.2.1
matplotlib
  • Installation
  • Documentation
  • Examples
  • Tutorials
  • Contributing

Navigation

  • index
  • modules |
  • next |
  • previous |
  • home| 
  • contents »
  • API Overview »
  • matplotlib.axes »

Table of Contents

  • matplotlib.axes.Axes.set_xticks
    • Examples using matplotlib.axes.Axes.set_xticks

Related Topics

  • Documentation overview
    • API Overview
      • matplotlib.axes
        • Previous: matplotlib.axes.Axes.get_adjustable
        • Next: matplotlib.axes.Axes.get_xticks
Show Page Source

matplotlib.axes.Axes.set_xticks¶

Axes.set_xticks(ticks, *, minor=False)¶

Set the x ticks with list of ticks

Parameters:

ticks : list

List of x-axis tick locations.

minor : bool, optional

If False sets major ticks, if True sets minor ticks. Default is False.

Examples using matplotlib.axes.Axes.set_xticks¶

../../_images/sphx_glr_barchart_thumb.png

Grouped bar chart with labels

../../_images/sphx_glr_psd_demo_thumb.png

Psd Demo

../../_images/sphx_glr_image_annotated_heatmap_thumb.png

Creating annotated heatmaps

../../_images/sphx_glr_axes_demo_thumb.png

Axes Demo

../../_images/sphx_glr_boxplot_vs_violin_thumb.png

Box plot vs. violin plot comparison

../../_images/sphx_glr_customized_violin_thumb.png

Violin plot customization

../../_images/sphx_glr_multiple_histograms_side_by_side_thumb.png

Producing multiple histograms side by side

../../_images/sphx_glr_hatch_demo_thumb.png

Hatch Demo

../../_images/sphx_glr_ggplot_thumb.png

ggplot style sheet

../../_images/sphx_glr_scatter_hist_locatable_axes_thumb.png

Scatter Histogram (Locatable Axes)

../../_images/sphx_glr_bachelors_degrees_by_gender_thumb.png

Bachelor's degrees by gender

../../_images/sphx_glr_firefox_thumb.png

Firefox

../../_images/sphx_glr_integral_thumb.png

Integral as the area under a curve

../../_images/sphx_glr_mandelbrot_thumb.png

Shaded & power normalized rendering

../../_images/sphx_glr_xkcd_thumb.png

XKCD

../../_images/sphx_glr_rain_thumb.png

Rain simulation

../../_images/sphx_glr_unchained_thumb.png

MATPLOTLIB UNCHAINED

../../_images/sphx_glr_contour_thumb.png

Frontpage contour example

../../_images/sphx_glr_histogram_thumb.png

Frontpage histogram example

../../_images/sphx_glr_membrane_thumb.png

Frontpage plot example

../../_images/sphx_glr_log_bar_thumb.png

Log Bar

../../_images/sphx_glr_mri_with_eeg_thumb.png

MRI With EEG

../../_images/sphx_glr_spines_bounds_thumb.png

Custom spine bounds

../../_images/sphx_glr_bar_unit_demo_thumb.png

Group barchart with units

../../_images/sphx_glr_demo_gridspec06_thumb.png

Nested GridSpecs

../../_images/sphx_glr_lifecycle_thumb.png

The Lifecycle of a Plot

../../_images/sphx_glr_gridspec_thumb.png

Customizing Figure Layouts Using GridSpec and Other Functions

© Copyright 2020 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2018 The Matplotlib development team.
Last updated on Mar 21, 2020. Created using Sphinx 1.8.5. Doc version 3.2.1.