matplotlib.axis.Axis.get_tick_params — Matplotlib 3.10.3 documentation (original) (raw)
Axis.get_tick_params(which='major')[source]#
Get appearance parameters for ticks, ticklabels, and gridlines.
Added in version 3.7.
Parameters:
which{'major', 'minor'}, default: 'major'
The group of ticks for which the parameters are retrieved.
Returns:
dict
Properties for styling tick elements added to the axis.
Notes
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).
Examples
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}