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

Skip to content

Commit f524359

Browse files
committed
Added images for tests
1 parent 82663d5 commit f524359

7 files changed

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

lib/matplotlib/tests/test_axes.py

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8863,38 +8863,28 @@ def test_axhvlinespan_interpolation():
88638863
ax.axhspan(.6, .7, .8, .9, fc="C2", alpha=.5)
88648864

88658865

8866-
@check_figures_equal()
8867-
def test_bar_hatchcolor_with_facecolor_and_edgecolor(fig_test, fig_ref):
8866+
@image_comparison(["bar_hatchcolor_with_facecolor_and_edgecolor"])
8867+
def test_bar_hatchcolor_with_facecolor_and_edgecolor():
88688868

88698869
x = [2, 3, 4, 5]
88708870
y = [1, 3, 1, 4]
88718871

8872-
ax1 = fig_test.subplots()
8873-
ax1.bar(x, y, hatch="////", facecolor=(0, 0, 0, 0),
8872+
fig, ax = plt.subplots()
8873+
ax.bar(x, y, hatch="////", facecolor=(0, 0, 0, 0),
88748874
hatchcolor="red", edgecolor="black")
88758875

8876-
ax2 = fig_ref.subplots()
8877-
ax2.bar(x, y, hatch="////", facecolor=(0, 0, 0, 0),
8878-
edgecolor="black", hatchcolor="red")
8879-
88808876

8881-
@check_figures_equal()
8882-
def test_bar_hatchcolor_with_facecolor(fig_test, fig_ref):
8877+
@image_comparison(["bar_hatchcolor_with_facecolor"])
8878+
def test_bar_hatchcolor_with_facecolor():
88838879
x = [6, 7, 8, 9]
88848880
y = [2, 4, 7, 3]
8885-
ax1 = fig_test.subplots()
8886-
ax1.bar(x, y, hatch="////", hatchcolor="green", facecolor=(0, 0, 0, 0))
8887-
8888-
ax2 = fig_ref.subplots()
8889-
ax2.bar(x, y, hatch="////", facecolor=(0, 0, 0, 0), hatchcolor="green")
8881+
fig, ax = plt.subplots()
8882+
ax.bar(x, y, hatch="////", hatchcolor="green", facecolor=(0, 0, 0, 0))
88908883

88918884

8892-
@check_figures_equal()
8893-
def test_bar_hatchcolor(fig_test, fig_ref):
8885+
@image_comparison(["bar_hatchcolor"])
8886+
def test_bar_hatchcolor():
88948887
x = [4, 7, 19, 8]
88958888
y = [1, 5, 8, 14]
8896-
ax1 = fig_test.subplots()
8897-
ax1.bar(x, y, hatch="////", hatchcolor="orange")
8898-
8899-
ax2 = fig_ref.subplots()
8900-
ax2.bar(x, y, hatch="////", hatchcolor="orange")
8889+
fig, ax = plt.subplots()
8890+
ax.bar(x, y, hatch="////", hatchcolor="orange")

0 commit comments

Comments
 (0)