Matplotlib.ticker.MultipleLocator Class in Python
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.
matplotlib.ticker.MultipleLocator class is used for setting a tick for every integer multiple of a base within the view interval.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course
Syntax: class matplotlib.ticker.MultipleLocator(base=1.0)
Methods of the class:
- set_params(self, base): It is used for setting the parameters within the locator.
- tick_values(self, vmin, vmax): For a given vmin and vmax it returns the values of the located ticks.
- view_limits(self, dmin, dmax): It is used for setting the view limits to the nearest multiples of base that contain the data.