gsplot.ticks#
- ticks(target, *, minor=True, axis='both', top=None, bottom=None, left=None, right=None, direction=None, which='both', **kwargs)#
Configure tick visibility, minor ticks, direction, and parameters.
- Parameters:
target (Axes | _AxesBase | Sequence[Axes | _AxesBase] | Mapping[Any, Axes | _AxesBase] | ndarray[tuple[int, ...], dtype[Any]]) – One Axes, an ordered Axes sequence, or an Axes mapping.
minor (bool | None) – Optional flag to turn minor ticks on (
True) or off (False). Defaults toTrue.axis (Literal['x', 'y', 'both']) – Coordinate axis to configure:
"x","y", or"both".top (bool | None) – Optional booleans controlling tick (and tick label) visibility on each edge.
bottom (bool | None) – Optional booleans controlling tick (and tick label) visibility on each edge.
left (bool | None) – Optional booleans controlling tick (and tick label) visibility on each edge.
right (bool | None) – Optional booleans controlling tick (and tick label) visibility on each edge.
direction (Literal['in', 'out', 'inout'] | None) – Tick direction:
"in","out", or"inout".which (Literal['both', 'major', 'minor']) – Which ticks to style:
"both","major", or"minor".**kwargs (Any) – Additional Matplotlib tick properties passed to
tick_params(e.g.length,width,color,pad).
- Returns:
The supplied Axes objects are updated in place.
- Return type:
None- Raises:
LayoutError – If target or options are invalid.
Examples
>>> import gsplot as gs >>> figure, ax = gs.subplots() >>> gs.ticks(ax, minor=True, right=False, direction="in") >>> figure.clear()