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

Commitb9274e1

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 parentab8ff4d commitb9274e1

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
@@ -348,9 +348,9 @@ def test_genfrac_displaystyle(fig_test, fig_ref):
348348
fig_test.text(0.1,0.1,r"$\dfrac{2x}{3y}$")
349349

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

355355

356356
deftest_mathtext_fallback_valid():

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp