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

Function test_rcupdate

lib/matplotlib/tests/test_backend_pgf.py:141–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

139@mpl.style.context('default')
140@pytest.mark.backend('pgf')
141def test_rcupdate():
142 rc_sets = [{'font.family': 'sans-serif',
143 'font.size': 30,
144 'figure.subplot.left': .2,
145 'lines.markersize': 10,
146 'pgf.rcfonts': False,
147 'pgf.texsystem': 'xelatex'},
148 {'font.family': 'monospace',
149 'font.size': 10,
150 'figure.subplot.left': .1,
151 'lines.markersize': 20,
152 'pgf.rcfonts': False,
153 'pgf.texsystem': 'pdflatex',
154 'pgf.preamble': ('\\usepackage[utf8x]{inputenc}'
155 '\\usepackage[T1]{fontenc}'
156 '\\usepackage{sfmath}')}]
157 tol = [0, 13.2] if _old_gs_version else [0, 0]
158 for i, rc_set in enumerate(rc_sets):
159 with mpl.rc_context(rc_set):
160 for substring, pkg in [('sfmath', 'sfmath'), ('utf8x', 'ucs')]:
161 if (substring in mpl.rcParams['pgf.preamble']
162 and not _has_tex_package(pkg)):
163 pytest.skip(f'needs {pkg}.sty')
164 create_figure()
165 compare_figure(f'pgf_rcupdate{i + 1}.pdf', tol=tol[i])
166
167
168# test backend-side clipping, since large numbers are not supported by TeX

Callers

nothing calls this directly

Calls 3

_has_tex_packageFunction · 0.90
compare_figureFunction · 0.85
create_figureFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…