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

Commitb41aa32

Browse files
committed
Use rcParams instead of rcParamsDefault in the test.
The test changes the DPI of the figure, but compares images after saving them, so rcParams['savefig.dpi'] is more appropriate.
1 parent562ed53 commitb41aa32

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎lib/matplotlib/tests/test_mathtext.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,9 @@ def test_genfrac_displaystyle(fig_test, fig_ref):
366366
fig_test.text(0.1,0.1,r"$\dfrac{2x}{3y}$")
367367

368368
thickness=_mathtext.TruetypeFonts.get_underline_thickness(
369-
None,None,fontsize=12,dpi=mpl.rcParamsDefault['figure.dpi'])
370-
fig_ref.text(
371-
0.1,0.1,fr"$\genfrac{{}}{{}}{{{thickness}}}{{0}}{{2x}}{{3y}}$")
369+
None,None,fontsize=mpl.rcParams["font.size"],
370+
dpi=mpl.rcParams["savefig.dpi"])
371+
fig_ref.text(0.1,0.1,r"$\genfrac{}{}{%f}{0}{2x}{3y}$"%thickness)
372372

373373

374374
deftest_mathtext_fallback_valid():

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp