8000 Merge pull request #25799 from timhoffm/discourage-fontdict · matplotlib/matplotlib@8166596 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8166596

Browse files
authored
Merge pull request #25799 from timhoffm/discourage-fontdict
Discourage fontdict
2 parents 315dc21 + 8d39a8b commit 8166596

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ def set_title(self, label, fontdict=None, loc=None, pad=None, *, y=None,
116116
Text to use for the title
117117
118118
fontdict : dict
119+
120+
.. admonition:: Discouraged
121+
122+
The use of *fontdict* is discouraged. Parameters should be passed as
123+
individual keyword arguments or using dictionary-unpacking
124+
``set_title(..., **fontdict)``.
125+
119126
A dictionary controlling the appearance of the title text,
120127
the default *fontdict* is::
121128
@@ -641,6 +648,13 @@ def text(self, x, y, s, fontdict=None, **kwargs):
641648
The text.
642649
643650
fontdict : dict, default: None
651+
652+
.. admonition:: Discouraged
653+
654+
The use of *fontdict* is discouraged. Parameters should be passed as
655+
individual keyword arguments or using dictionary-unpacking
656+
``text(..., **fontdict)``.
657+
644658
A dictionary to override the default text properties. If fontdict
645659
is None, the defaults are determined by `.rcParams`.
646660

lib/matplotlib/axis.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,6 +1753,13 @@ def set_label_text(self, label, fontdict=None, **kwargs):
17531753
Text string.
17541754
fontdict : dict
17551755
Text properties.
1756+
1757+
.. admonition:: Discouraged
1758+
1759+
The use of *fontdict* is discouraged. Parameters should be passed as
1760+
individual keyword arguments or using dictionary-unpacking
1761+
``set_label_text(..., **fontdict)``.
1762+
17561763
**kwargs
17571764
Merged into fontdict.
17581765
"""
@@ -1913,6 +1920,13 @@ def set_ticklabels(self, labels, *, minor=False, fontdict=None, **kwargs):
19131920
If True, set minor ticks instead of major ticks.
19141921
19151922
fontdict : dict, optional
1923+
1924+
.. admonition:: Discouraged
1925+
1926+
The use of *fontdict* is discouraged. Parameters should be passed as
1927+
individual keyword arguments or using dictionary-unpacking
1928+
``set_ticklabels(..., **fontdict)``.
1929+
19161930
A dictionary controlling the appearance of the ticklabels.
19171931
The default *fontdict* is::
19181932

0 commit comments

Comments
 (0)
0