8000 Discourage fontdict by timhoffm · Pull Request #25799 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Discourage fontdict #25799

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
May 2, 2023
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
14 changes: 14 additions & 0 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ def set_title(self, label, fontdict=None, loc=None, pad=None, *, y=None,
Text to use for the title

fontdict : dict

.. admonition:: Discouraged

The use of *fontdict* is discouraged. Parameters should be passed as
individual keyword arguments or using dictionary-unpacking
``set_title(..., **fontdict)``.

A dictionary controlling the appearance of the title text,
the default *fontdict* is::

Expand Down Expand Up @@ -641,6 +648,13 @@ def text(self, x, y, s, fontdict=None, **kwargs):
The text.

fontdict : dict, default: None

.. admonition:: Discouraged

The use of *fontdict* is discouraged. Parameters should be passed as
individual keyword arguments or using dictionary-unpacking
``text(..., **fontdict)``.

A dictionary to override the default text properties. If fontdict
is None, the defaults are determined by `.rcParams`.

8000 Expand Down
14 changes: 14 additions & 0 deletions lib/matplotlib/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1753,6 +1753,13 @@ def set_label_text(self, label, fontdict=None, **kwargs):
Text string.
fontdict : dict
Text properties.

.. admonition:: Discouraged

The use of *fontdict* is discouraged. Parameters should be passed as
individual keyword arguments or using dictionary-unpacking
``set_label_text(..., **fontdict)``.

**kwargs
Merged into fontdict.
"""
Expand Down Expand Up @@ -1913,6 +1920,13 @@ def set_ticklabels(self, labels, *, minor=False, fontdict=None, **kwargs):
If True, set minor ticks instead of major ticks.

fontdict : dict, optional

.. admonition:: Discouraged

The use of *fontdict* is discouraged. Parameters should be passed as
individual keyword arguments or using dictionary-unpacking
``set_ticklabels(..., **fontdict)``.

A dictionary controlling the appearance of the ticklabels.
The default *fontdict* is::

Expand Down
0