matplotlib.axis.Axis.get_tick_params
- Axis.get_tick_params(which='major')
Get appearance parameters for ticks, ticklabels, and gridlines.
- Parameters:
- which : {'major', 'minor'}, default: 'major'
Get appearance parameters for ticks, ticklabels, and gridlines.
The group of ticks for which the parameters are retrieved.
Properties for styling tick elements added to the axis.
This method returns the appearance parameters for styling new
elements added to this axis and may be different from the values
on current elements if they were modified directly by the user
(e.g., via set_* methods on individual tick objects).
>>> ax.yaxis.set_tick_params(labelsize=30, labelcolor='red',
... direction='out', which='major')
>>> ax.yaxis.get_tick_params(which='major')
{'direction': 'out',
'left': True,
'right': False,
'labelleft': True,
'labelright': False,
'gridOn': False,
'labelsize': 30,
'labelcolor': 'red'}
>>> ax.yaxis.get_tick_params(which='minor')
{'left': True,
'right': False,
'labelleft': True,
'labelright': False,
'gridOn': False}