MCPcopy
hub / github.com/matplotlib/matplotlib / set_text

Method set_text

lib/matplotlib/text.py:1437–1452  ·  view source on GitHub ↗

r""" Set the text string *s*. It may contain newlines (``\n``) or math in LaTeX syntax. Parameters ---------- s : object Any object gets converted to its `str` representation, except for ``None`` which is converted to an empty string.

(self, s)

Source from the content-addressed store, hash-verified

1435 self.stale = True
1436
1437 def set_text(self, s):
1438 r"""
1439 Set the text string *s*.
1440
1441 It may contain newlines (``\n``) or math in LaTeX syntax.
1442
1443 Parameters
1444 ----------
1445 s : object
1446 Any object gets converted to its `str` representation, except for
1447 ``None`` which is converted to an empty string.
1448 """
1449 s = '' if s is None else str(s)
1450 if s != self._text:
1451 self._text = s
1452 self.stale = True
1453
1454 def _preprocess_math(self, s):
1455 """

Callers 15

_char_index_atMethod · 0.95
_draw_offset_textMethod · 0.45
drawMethod · 0.45
get_window_extentsMethod · 0.45
_update_offsetTextMethod · 0.45
set_labelMethod · 0.45
test_SubplotZeroFunction · 0.45
test_curvelinear3Function · 0.45
test_curvelinear4Function · 0.45
test_polar_boxFunction · 0.45
test_axis_directionFunction · 0.45

Calls

no outgoing calls

Tested by 15

test_SubplotZeroFunction · 0.36
test_curvelinear3Function · 0.36
test_curvelinear4Function · 0.36
test_polar_boxFunction · 0.36
test_axis_directionFunction · 0.36
test_glyphs_subsetFunction · 0.36
test_ft2font_clearFunction · 0.36
test_ft2font_set_sizeFunction · 0.36
test_ft2font_featuresFunction · 0.36
test_ft2font_set_textFunction · 0.36
test_ft2font_languageFunction · 0.36