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

Commit638bdd0

Browse files
committed
Update test_log_scales to use check_figures_equal.
Its original intent was to check that ax{v,h}line works in (sym)logscales, and the baseline svg changed with the removal of minor tickoverstriking.
1 parentb9cf638 commit638bdd0

File tree

4 files changed

+12
-285
lines changed

4 files changed

+12
-285
lines changed
Binary file not shown.
Binary file not shown.

‎lib/matplotlib/tests/baseline_images/test_scale/log_scales.svg

Lines changed: 0 additions & 278 deletions
This file was deleted.

‎lib/matplotlib/tests/test_scale.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
frommatplotlib.testing.decoratorsimportimage_comparison
1+
frommatplotlib.testing.decoratorsimportcheck_figures_equal,image_comparison
22
importmatplotlib.pyplotasplt
33
frommatplotlib.scaleimportLog10Transform,InvertedLog10Transform
44

@@ -8,12 +8,17 @@
88
importpytest
99

1010

11-
@image_comparison(baseline_images=['log_scales'],remove_text=True)
12-
deftest_log_scales():
13-
ax=plt.figure().add_subplot(122,yscale='log',xscale='symlog')
14-
15-
ax.axvline(24.1)
16-
ax.axhline(24.1)
11+
@check_figures_equal()
12+
deftest_log_scales(fig_test,fig_ref):
13+
ax_test=fig_test.add_subplot(122,yscale='log',xscale='symlog')
14+
ax_test.axvline(24.1)
15+
ax_test.axhline(24.1)
16+
xlim=ax_test.get_xlim()
17+
ylim=ax_test.get_ylim()
18+
ax_ref=fig_ref.add_subplot(122,yscale='log',xscale='symlog')
19+
ax_ref.set(xlim=xlim,ylim=ylim)
20+
ax_ref.plot([24.1,24.1],ylim,'b')
21+
ax_ref.plot(xlim, [24.1,24.1],'b')
1722

1823

1924
@image_comparison(baseline_images=['logit_scales'],remove_text=True,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp