Matplotlib.axes.Axes.minorticks_on() in Python Last Updated : 12 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. matplotlib.axes.Axes.minorticks_on() Function The Axes.minorticks_on() function in axes module of matplotlib library is used to display minor ticks on the axes. Syntax: Axes.minorticks_on(self) Below examples illustrate the matplotlib.axes.Axes.minorticks_on() function in matplotlib.axes: Example 1: Python3 # Implementation of matplotlib function import numpy as np import matplotlib.pyplot as plt import matplotlib.cbook as cbook import matplotlib.cm as cm from matplotlib.collections import LineCollection from matplotlib.ticker import MultipleLocator with cbook.get_sample_data('s1045.ima.gz') as dfile: im = np.frombuffer(dfile.read(), np.uint16).reshape((256, 256)) fig, ax1 = plt.subplots() im = np.ravel(im) im = im[np.nonzero(im)] im = im / (2**20 - 1) ax1.hist(im, bins = 40, color ="green") ax1.set_yticks([]) ax1.set_xlabel('Intensity (a.u.)') ax1.set_ylabel('MRI density') ax1.minorticks_on() fig.suptitle('matplotlib.axes.Axes.minorticks_on() \ function Example\n\n', fontweight ="bold") plt.show() Output: Example 2: Python3 # Implementation of matplotlib function import matplotlib.pyplot as plt import numpy as np x = np.arange(0.0, 2, 0.01) y1 = np.sin(2 * np.pi * x) y2 = 1.2 * np.sin(4 * np.pi * x) fig, (ax, ax1) = plt.subplots(1, 2) ax.fill_between(x, y1, y2, color ="green", alpha = 0.6) ax.set_title("Without minorticks_on()") ax1.fill_between(x, y1, y2, color ="green", alpha = 0.6) ax1.minorticks_on() ax1.set_title("With minorticks_on()") fig.suptitle('matplotlib.axes.Axes.minorticks_on()\ function Example\n\n', fontweight ="bold") plt.show() Output: Comment More infoAdvertise with us Next Article Matplotlib.axes.Axes.set_position() in Python S SHUBHAMSINGH10 Follow Improve Article Tags : Python Python-matplotlib Practice Tags : python Similar Reads Matplotlib.axes.Axes.minorticks_off() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read Matplotlib.axes.Axes.matshow() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read Matplotlib.axes.Axes.set_position() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read Matplotlib.axes.Axes.end_pan() in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 1 min read matplotlib.axes.Axes.can_pan() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read Matplotlib.axis.Axis.get_minorticklocs() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. matplotlib.axis.Axis.get_minorticklocs() Function The Axis.get_minorticklocs() 2 min read Like