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

Skip to content

Commit 09d3dcc

Browse files
committed
Add test for #9235
1 parent c40914b commit 09d3dcc

File tree

4 files changed

+286
-0
lines changed

4 files changed

+286
-0
lines changed
Lines changed: 264 additions & 0 deletions
Loading

lib/matplotlib/tests/test_axes.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,28 @@ def test_fill_between_interpolate():
961961
interpolate=True)
962962

963963

964+
@image_comparison(baseline_images=['fill_between_interpolate_decreasing'],
965+
remove_text=True)
966+
def test_fill_between_interpolate_decreasing():
967+
p = np.array([724.3, 700, 655])
968+
t = np.array([9.4, 7, 2.2])
969+
prof = np.array([7.9, 6.6, 3.8])
970+
971+
fig = plt.figure(figsize=(9, 9))
972+
ax = fig.add_subplot(1, 1, 1)
973+
974+
ax.plot(t, p, 'tab:red')
975+
ax.plot(prof, p, 'k')
976+
977+
ax.fill_betweenx(p, t, prof, where=prof < t,
978+
facecolor='blue', interpolate=True, alpha=0.4)
979+
ax.fill_betweenx(p, t, prof, where=prof > t,
980+
facecolor='red', interpolate=True, alpha=0.4)
981+
982+
ax.set_xlim(0, 30)
983+
ax.set_ylim(800, 600)
984+
985+
964986
@image_comparison(baseline_images=['symlog'])
965987
def test_symlog():
966988
x = np.array([0, 1, 2, 4, 6, 9, 12, 24])

0 commit comments

Comments
 (0)