Skip to content

Commit

Permalink
Backport PR matplotlib#28459: DOC: Document kwargs scope for tick set…
Browse files Browse the repository at this point in the history
…ter functions
  • Loading branch information
QuLogic authored and meeseeksmachine committed Jun 25, 2024
1 parent 645e4ac commit b14dc23
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
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 @@ -2170,6 +2170,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 @@ -2241,6 +2256,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

0 comments on commit b14dc23

Please sign in to comment.