Matplotlib is a library in Python and it is a 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_agg_filter() Function
The Tick.get_agg_filter() function in axis module of matplotlib library is used to get the filter function to be used for agg filter.
Syntax: Tick.get_agg_filter(self)
Parameters: This method does not accepts any parameter.
Return value: This method return the filter function to be used for agg filter.
Below examples illustrate the matplotlib.axis.Tick.get_agg_filter() function in matplotlib.axis:
Example 1:
Python3
# Implementation of matplotlib function from matplotlib.axis import Tick import numpy as np import matplotlib.pyplot as plt from matplotlib.artist import Artist xx = np.random.rand( 3 , 4 ) fig, axs = plt.subplots() m = axs.pcolor(xx) m.set_zorder( 2 ) val = Tick.get_agg_filter(axs) axs.set_title( "Value Return by get_agg_filter(): " + str (val)) fig.suptitle( """matplotlib.axis.Tick.get_agg_filter() function Example\n""" , fontweight = "bold") plt.show() |
Output:
Example 2:
Python3
# Implementation of matplotlib function from matplotlib.axis import Tick import numpy as np import matplotlib.pyplot as plt np.random.seed( 10 * * 7 ) neveropen = np.random.randn( 40 ) fig, axs = plt.subplots() axs.acorr(neveropen, usevlines = True , normed = True , maxlags = 10 , lw = 2 ) axs.grid( True ) val = Tick.get_agg_filter(axs) axs.set_title( "Value Return by get_agg_filter(): " + str (val)) fig.suptitle( """matplotlib.axis.Tick.get_agg_filter() function Example\n""" , fontweight = "bold") plt.show() |
Output: