MCPcopy
hub / github.com/matplotlib/matplotlib / set_fontproperties

Method set_fontproperties

lib/matplotlib/text.py:1478–1490  ·  view source on GitHub ↗

Set the font properties that control the text. Parameters ---------- fp : `.font_manager.FontProperties` or `str` or `pathlib.Path` If a `str`, it is interpreted as a fontconfig pattern parsed by `.FontProperties`. If a `pathlib.Path`, it is

(self, fp)

Source from the content-addressed store, hash-verified

1476 return s.replace(r"\$", "$"), False
1477
1478 def set_fontproperties(self, fp):
1479 """
1480 Set the font properties that control the text.
1481
1482 Parameters
1483 ----------
1484 fp : `.font_manager.FontProperties` or `str` or `pathlib.Path`
1485 If a `str`, it is interpreted as a fontconfig pattern parsed by
1486 `.FontProperties`. If a `pathlib.Path`, it is interpreted as the
1487 absolute path to a font file.
1488 """
1489 self._fontproperties = FontProperties._from_any(fp).copy()
1490 self.stale = True
1491
1492 @_docstring.kwarg_doc("bool, default: :rc:`text.usetex`")
1493 def set_usetex(self, usetex):

Callers 3

updateMethod · 0.95
set_titleMethod · 0.80

Calls 2

_from_anyMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected