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

Function test_default_math_fontfamily

lib/matplotlib/tests/test_mathtext.py:493–505  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

491
492
493def test_default_math_fontfamily():
494 mpl.rcParams['mathtext.fontset'] = 'cm'
495 test_str = r'abc$abc\alpha$'
496 fig, ax = plt.subplots()
497
498 text1 = fig.text(0.1, 0.1, test_str, font='Arial')
499 prop1 = text1.get_fontproperties()
500 assert prop1.get_math_fontfamily() == 'cm'
501 text2 = fig.text(0.2, 0.2, test_str, fontproperties='Arial')
502 prop2 = text2.get_fontproperties()
503 assert prop2.get_math_fontfamily() == 'cm'
504
505 fig.draw_without_rendering()
506
507
508def test_argument_order():

Callers

nothing calls this directly

Calls 5

get_fontpropertiesMethod · 0.80
subplotsMethod · 0.45
textMethod · 0.45
get_math_fontfamilyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…