Matplotlib.axis.Axis.get_major_locator() function in Python Last Updated : 03 Jun, 2020 Comments Improve Suggest changes Like Article Like Report 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_major_locator() Function The Axis.get_major_locator() function in axis module of matplotlib library is used to get the locator of the major ticker. Syntax: Axis.get_major_locator(self) Parameters: This method does not accepts any parameters. Return value: This method returns the locator of the major ticker. Below examples illustrate the matplotlib.axis.Axis.get_major_locator() function in matplotlib.axis: Example 1: Python3 # Implementation of matplotlib function import numpy as np from matplotlib.axis import Axis import matplotlib.pyplot as plt x = np.linspace(0, 10, 1000) y = np.sin(2 * x) fig = plt.figure() ax = fig.add_subplot(111) ax.plot(x, y) ax.grid() print(Axis.get_major_locator(ax.yaxis)) plt.title("Matplotlib.axis.Axis.get_major_locator()\n\ Function Example", fontsize = 12, fontweight ='bold') plt.show() Output: <matplotlib.ticker.AutoLocator object at 0x07D67ED0> Example 2: Python3 # Implementation of matplotlib function import numpy as np from matplotlib.axis import Axis import matplotlib.pyplot as plt np.random.seed(19680801) fig, ax = plt.subplots() x, y, s, c = np.random.rand(4, 100) s *= 100 ax.scatter(x, y, s, c) ax.grid() print(Axis.get_major_locator(ax.xaxis)) plt.title("Matplotlib.axis.Axis.get_major_locator()\n\ Function Example", fontsize = 12, fontweight ='bold') plt.show() Output: <matplotlib.ticker.AutoLocator object at 0x07CA9FD0> Comment More infoAdvertise with us Next Article Matplotlib.axis.Axis.get_major_locator() function in Python S SHUBHAMSINGH10 Follow Improve Article Tags : Python Python-matplotlib Matplotlib-Axis Class Practice Tags : python Similar Reads Matplotlib.axis.Axis.set_major_locator() 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.set_major_locator() Function The Axis.set_major_locator() 2 min read Matplotlib.axis.Axis.get_minor_locator() 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_minor_locator() Function The Axis.get_minor_locator() 1 min read Matplotlib.axis.Axis.get_major_ticks() 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_major_ticks() Function The Axis.get_major_ticks() func 2 min read Matplotlib.axis.Axis.get_label() 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_label() Function The Axis.get_label() function in axis 2 min read Matplotlib.axis.Axis.get_majorticklocs() 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_majorticklocs() Function The Axis.get_majorticklocs() 2 min read Matplotlib.axis.Axis.get_majorticklines() 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_majorticklines() Function The Axis.get_majorticklines( 2 min read Matplotlib.axis.Axis.get_majorticklabels() 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_majorticklabels() Function The Axis.get_majorticklabel 2 min read Matplotlib.axis.Axis.get_major_formatter() 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_major_formatter() Function The Axis.get_major_formatte 1 min read Matplotlib.axis.Axis.get_label_text() 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_label_text() Function The Axis.get_label_text() functi 2 min read Like