diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 38fe07873e1d..91aba7c1bdac 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -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:: @@ -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`. diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index eb24ff1fac84..717000131b13 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -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. """ @@ -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::