Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4736de1

Browse files
SocobSimon May
authored and
Simon May
committed
Add image test for#26892
1 parent4b853bc commit4736de1

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Binary file not shown.

‎lib/matplotlib/tests/test_backend_pgf.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,3 +402,27 @@ def test_sketch_params():
402402
# \pgfdecoratecurrentpath must be after the path definition and before the
403403
# path is used (\pgfusepath)
404404
assertbaselineinbuf
405+
406+
407+
# test to make sure that the document font size is set consistently (see #26892)
408+
@needs_pgf_xelatex
409+
@pytest.mark.skipif(
410+
not_has_tex_package('unicode-math'),reason='needs unicode-math.sty'
411+
)
412+
@pytest.mark.backend('pgf')
413+
@image_comparison(['pgf_document_font_size.pdf'],style='default',remove_text=True)
414+
deftest_document_font_size():
415+
mpl.rcParams.update({
416+
'pgf.texsystem':'xelatex',
417+
'pgf.rcfonts':False,
418+
'pgf.preamble':r'\usepackage{unicode-math}',
419+
})
420+
plt.figure()
421+
plt.plot([],
422+
label=r'$this is a very very very long math label a \times b + 10^{-3}$ '
423+
r'and some text'
424+
)
425+
plt.plot([],
426+
label=r'\normalsize the document font size is \the\fontdimen6\font'
427+
)
428+
plt.legend()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp