MCPcopy
hub / github.com/matplotlib/matplotlib / tick_params

Method tick_params

lib/matplotlib/axes/_base.py:3605–3687  ·  view source on GitHub ↗

Change the appearance of ticks, tick labels, and gridlines. Tick properties that are not explicitly set using the keyword arguments remain unchanged unless *reset* is True. For the current style settings, see `.Axis.get_tick_params`. Parameters ----

(self, axis='both', **kwargs)

Source from the content-addressed store, hash-verified

3603 self.stale = True
3604
3605 def tick_params(self, axis='both', **kwargs):
3606 """
3607 Change the appearance of ticks, tick labels, and gridlines.
3608
3609 Tick properties that are not explicitly set using the keyword
3610 arguments remain unchanged unless *reset* is True. For the current
3611 style settings, see `.Axis.get_tick_params`.
3612
3613 Parameters
3614 ----------
3615 axis : {'x', 'y', 'both'}, default: 'both'
3616 The axis to which the parameters are applied.
3617 which : {'major', 'minor', 'both'}, default: 'major'
3618 The group of ticks to which the parameters are applied.
3619 reset : bool, default: False
3620 Whether to reset the ticks to defaults before updating them.
3621
3622 Other Parameters
3623 ----------------
3624 direction : {'in', 'out', 'inout'}
3625 Puts ticks inside the Axes, outside the Axes, or both.
3626 length : float
3627 Tick length in points.
3628 width : float
3629 Tick width in points.
3630 color : :mpltype:`color`
3631 Tick color.
3632 pad : float
3633 Distance in points between tick and label.
3634 labelsize : float or str
3635 Tick label font size in points or as a string (e.g., 'large').
3636 labelcolor : :mpltype:`color`
3637 Tick label color.
3638 labelfontfamily : str
3639 Tick label font.
3640 colors : :mpltype:`color`
3641 Tick color and label color.
3642 zorder : float
3643 Tick and label zorder.
3644 bottom, top, left, right : bool
3645 Whether to draw the respective ticks.
3646 labelbottom, labeltop, labelleft, labelright : bool
3647 Whether to draw the respective tick labels.
3648 labelrotation : float
3649 Tick label rotation angle in degrees. See `.Text.set_rotation`.
3650 labelrotation_mode : {'default', 'anchor', 'xtick', 'ytick'}
3651 Tick label rotation mode. See `.Text.set_rotation_mode`.
3652 grid_color : :mpltype:`color`
3653 Gridline color.
3654 grid_alpha : float
3655 Transparency of gridlines: 0 (transparent) to 1 (opaque).
3656 grid_linewidth : float
3657 Width of gridlines in points.
3658 grid_linestyle : str
3659 Any valid `.Line2D` line style spec.
3660
3661 Examples
3662 --------

Callers 15

__init__Method · 0.95
make_matplotlib_iconFunction · 0.45
tick_paramsFunction · 0.45
test_tick_not_in_layoutFunction · 0.45
test_imshowMethod · 0.45
test_twin_spinesFunction · 0.45
test_reset_gridFunction · 0.45
test_reset_ticksFunction · 0.45

Calls 2

set_tick_paramsMethod · 0.80
popMethod · 0.45

Tested by 15

test_tick_not_in_layoutFunction · 0.36
test_imshowMethod · 0.36
test_twin_spinesFunction · 0.36
test_reset_gridFunction · 0.36
test_reset_ticksFunction · 0.36
test_text_labelsizeFunction · 0.36
test_loglogFunction · 0.36