Matplotlib.axis.Axis.set_tick_params() in Python Last Updated : 01 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.set_tick_params() Function The Axis.set_tick_params() function in axis module of matplotlib library is used to set appearance parameters for ticks, ticklabels, and gridlines. Syntax: Axis.set_tick_params(self, axis='major', reset=False, \*\*kw) Parameters: This method accepts the following parameters. axis: This parameter is the used to which axis to apply the parameters to. Return value: This method does not returns any value. Below examples illustrate the matplotlib.axis.Axis.set_tick_params() function in matplotlib.axis: Example 1: Python3 # Implementation of matplotlib function import matplotlib.pyplot as plt import numpy as np t = np.arange(0.0, 2.0, 0.02) fig, ax1 = plt.subplots() ax1.plot(t, np.sin(4*np.pi * t)) ax1.grid(True) ax1.set_ylim((-2, 2)) ax1.xaxis.set_tick_params(labelcolor='r') ax1.yaxis.set_tick_params(labelcolor='g') plt.title('matplotlib.axis.Axis.set_tick_params()\n\ function Example', fontweight ="bold") plt.show() Output: Example 2: Python3 # Implementation of matplotlib function import matplotlib.pyplot as plt from matplotlib.dates import (YEARLY, DateFormatter, rrulewrapper, RRuleLocator, drange) import numpy as np import datetime np.random.seed(19680801) Val1 = rrulewrapper(YEARLY, byeaster=1, interval=5) Val2 = RRuleLocator(Val1) formatter = DateFormatter('%y/%m/%d') date1 = datetime.date(2000, 1, 1) date2 = datetime.date(2014, 4, 12) delta = datetime.timedelta(days=10) dates = drange(date1, date2, delta) s = np.random.rand(len(dates)) fig, ax = plt.subplots() plt.plot_date(dates, s,'go') ax.xaxis.set_major_locator(Val2) ax.xaxis.set_major_formatter(formatter) ax.xaxis.set_tick_params(rotation=25, labelsize=8 , labelcolor = "g") ax.yaxis.set_tick_params(rotation=25, labelsize=12 , labelcolor = "r") plt.title('matplotlib.axis.Axis.set_tick_params()\n\ function Example', fontweight ="bold") plt.show() Output: Comment More infoAdvertise with us Next Article Matplotlib.axis.Axis.set_tick_params() in Python S SHUBHAMSINGH10 Follow Improve Article Tags : Python Python-matplotlib Matplotlib axes-class Practice Tags : python Similar Reads Matplotlib.axes.Axes.tick_params() 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. 3 min read Matplotlib.axis.Tick.get_sketch_params() 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.Tick.get_sketch_params() Function The Tick.get_sketch_params() 2 min read Matplotlib.axes.Axes.set_sketch_params() 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.XAxis.set_tick_params() in Python The XAxis.set_tick_params() function in axis module of matplotlib library is used to set appearance parameters for ticks, ticklabels, and gridlines. Syntax: XAxis.set_tick_params(self, which='major', reset=False, **kw) Parameters: This method accepts the following parameters. which: This parameter 1 min read Matplotlib.axes.Axes.set_yticks() 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 Like