Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 36dd9cd

Browse files
committed
Update test that changed due to minor tick overstrike logic.
1 parent 46fea7f commit 36dd9cd

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed
Binary file not shown.

lib/matplotlib/tests/test_axes.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,15 @@ def test_inverted_cla():
266266
plt.close(fig)
267267

268268

269-
@image_comparison(baseline_images=["minorticks_on_rcParams_both"],
270-
extensions=['png'])
271-
def test_minorticks_on_rcParams_both():
272-
fig = plt.figure()
273-
matplotlib.rcParams['xtick.minor.visible'] = True
274-
matplotlib.rcParams['ytick.minor.visible'] = True
275-
276-
plt.plot([0, 1], [0, 1])
277-
plt.axis([0, 1, 0, 1])
269+
@check_figures_equal(extensions=["png"])
270+
def test_minorticks_on_rcParams_both(fig_test, fig_ref):
271+
with matplotlib.rc_context({"xtick.minor.visible": True,
272+
"ytick.minor.visible": True}):
273+
ax_test = fig_test.subplots()
274+
ax_test.plot([0, 1], [0, 1])
275+
ax_ref = fig_ref.subplots()
276+
ax_ref.plot([0, 1], [0, 1])
277+
ax_ref.minorticks_on()
278278

279279

280280
@image_comparison(baseline_images=["autoscale_tiny_range"], remove_text=True)

0 commit comments

Comments
 (0)