gsplot.minor_ticks#

minor_ticks(target, enabled, *, axis='both', top=None, bottom=None, left=None, right=None)#

Enable or disable minor ticks on explicit Axes targets.

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.

  • enabled (bool) – Whether minor ticks should be visible.

  • axis (Literal['x', 'y', 'both']) – Coordinate axis to update: "x", "y", or "both".

  • top (bool | None) – Optional boolean flags for minor tick visibility on each edge.

  • bottom (bool | None) – Optional boolean flags for minor tick visibility on each edge.

  • left (bool | None) – Optional boolean flags for minor tick visibility on each edge.

  • right (bool | None) – Optional boolean flags for minor tick visibility on each edge.

Returns:

The supplied Axes objects are updated in place.

Return type:

None

Raises:

LayoutError – If the target, enabled flag, axis selector, or edge options are invalid.

Examples

>>> import gsplot as gs
>>> figure, ax = gs.subplots()
>>> gs.minor_ticks(ax, True, axis="x", right=False)
>>> figure.clear()