.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "_auto_examples/repeat_axis_ticks.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr__auto_examples_repeat_axis_ticks.py: Repeat Axis Ticks Example ===================================== When ``sharex`` or ``sharey`` is used, Matplotlib suppresses tick labels on inner subplots. :func:`sysplot.restore_tick_labels` restores them so every subplot in the grid displays its own axis labels. .. GENERATED FROM PYTHON SOURCE LINES 8-26 .. image-sg:: /_auto_examples/images/sphx_glr_repeat_axis_ticks_001.png :alt: Repeat Axis Ticks :srcset: /_auto_examples/images/sphx_glr_repeat_axis_ticks_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import sysplot as ssp ssp.apply_config() fig, ax = plt.subplots(2, 2, sharex=True, sharey=True) # shows the axis ticks labels on every subplot, even when axes are shared. ssp.restore_tick_labels(fig) for a in ax.flatten(): a.plot([-2, 2], [-1, 1]) a.set(xlabel="x", ylabel="y") plt.suptitle("Repeat Axis Ticks") plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.350 seconds) .. _sphx_glr_download__auto_examples_repeat_axis_ticks.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: repeat_axis_ticks.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: repeat_axis_ticks.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: repeat_axis_ticks.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_