MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / set_label_text

Method set_label_text

lib/matplotlib/axis.py:2026–2052  ·  view source on GitHub ↗

Set the text value of the axis label. Parameters ---------- label : str Text string. fontdict : dict Text properties. .. admonition:: Discouraged The use of *fontdict* is discouraged. Parameters should be

(self, label, fontdict=None, **kwargs)

Source from the content-addressed store, hash-verified

2024 return self.units
2025
2026 def set_label_text(self, label, fontdict=None, **kwargs):
2027 """
2028 Set the text value of the axis label.
2029
2030 Parameters
2031 ----------
2032 label : str
2033 Text string.
2034 fontdict : dict
2035 Text properties.
2036
2037 .. admonition:: Discouraged
2038
2039 The use of *fontdict* is discouraged. Parameters should be passed as
2040 individual keyword arguments or using dictionary-unpacking
2041 ``set_label_text(..., **fontdict)``.
2042
2043 **kwargs
2044 Merged into fontdict.
2045 """
2046 self.isDefault_label = False
2047 self.label.set_text(label)
2048 if fontdict is not None:
2049 self.label.update(fontdict)
2050 self.label.update(kwargs)
2051 self.stale = True
2052 return self.label
2053
2054 def set_major_formatter(self, formatter):
2055 """

Callers 6

_update_axisinfoMethod · 0.95
set_zlabelMethod · 0.80
set_labelMethod · 0.80
apply_callbackFunction · 0.80
set_xlabelMethod · 0.80
set_ylabelMethod · 0.80

Calls 2

set_textMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected