Skip to content

DOC: Document kwargs scope for tick setter functions #28459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/matplotlib/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,9 @@ def set_ticklabels(self, labels, *, minor=False, fontdict=None, **kwargs):

.. warning::

This only sets the properties of the current ticks.
This only sets the properties of the current ticks, which is
only sufficient for static plots.

Ticks are not guaranteed to be persistent. Various operations
can create, delete and modify the Tick instances. There is an
imminent risk that these settings can get lost if you work on
Expand Down
29 changes: 29 additions & 0 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2182,6 +2182,21 @@ def xticks(
**kwargs
`.Text` properties can be used to control the appearance of the labels.

.. warning::

This only sets the properties of the current ticks, which is
only sufficient if you either pass *ticks*, resulting in a
fixed list of ticks, or if the plot is static.

Ticks are not guaranteed to be persistent. Various operations
can create, delete and modify the Tick instances. There is an
imminent risk that these settings can get lost if you work on
the figure further (including also panning/zooming on a
displayed figure).

Use `~.pyplot.tick_params` instead if possible.


Returns
-------
locs
Expand Down Expand Up @@ -2253,6 +2268,20 @@ def yticks(
**kwargs
`.Text` properties can be used to control the appearance of the labels.

.. warning::

This only sets the properties of the current ticks, which is
only sufficient if you either pass *ticks*, resulting in a
fixed list of ticks, or if the plot is static.

Ticks are not guaranteed to be persistent. Various operations
can create, delete and modify the Tick instances. There is an
imminent risk that these settings can get lost if you work on
the figure further (including also panning/zooming on a
displayed figure).

Use `~.pyplot.tick_params` instead if possible.

Returns
-------
locs
Expand Down
Loading