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

Appearance settings

Commit 638bdd0

Browse filesBrowse 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)log scales, and the baseline svg changed with the removal of minor tick overstriking.
1 parent b9cf638 commit 638bdd0
Copy full SHA for 638bdd0

File tree

Expand file treeCollapse file tree

4 files changed

+12
-285
lines changed
Filter options
Expand file treeCollapse file tree

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

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_scale/log_scales.svg
-278Lines changed: 0 additions & 278 deletions
This file was deleted.

‎lib/matplotlib/tests/test_scale.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_scale.py
+12-7Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from matplotlib.testing.decorators import image_comparison
1+
from matplotlib.testing.decorators import check_figures_equal, image_comparison
22
import matplotlib.pyplot as plt
33
from matplotlib.scale import Log10Transform, InvertedLog10Transform
44

@@ -8,12 +8,17 @@
88
import pytest
99

1010

11-
@image_comparison(baseline_images=['log_scales'], remove_text=True)
12-
def test_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+
def test_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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.