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

Function test_argument_order

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

Source from the content-addressed store, hash-verified

506
507
508def test_argument_order():
509 mpl.rcParams['mathtext.fontset'] = 'cm'
510 test_str = r'abc$abc\alpha$'
511 fig, ax = plt.subplots()
512
513 text1 = fig.text(0.1, 0.1, test_str,
514 math_fontfamily='dejavusans', font='Arial')
515 prop1 = text1.get_fontproperties()
516 assert prop1.get_math_fontfamily() == 'dejavusans'
517 text2 = fig.text(0.2, 0.2, test_str,
518 math_fontfamily='dejavusans', fontproperties='Arial')
519 prop2 = text2.get_fontproperties()
520 assert prop2.get_math_fontfamily() == 'dejavusans'
521 text3 = fig.text(0.3, 0.3, test_str,
522 font='Arial', math_fontfamily='dejavusans')
523 prop3 = text3.get_fontproperties()
524 assert prop3.get_math_fontfamily() == 'dejavusans'
525 text4 = fig.text(0.4, 0.4, test_str,
526 fontproperties='Arial', math_fontfamily='dejavusans')
527 prop4 = text4.get_fontproperties()
528 assert prop4.get_math_fontfamily() == 'dejavusans'
529
530 fig.draw_without_rendering()
531
532
533def test_mathtext_cmr10_minus_sign():

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…