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

Skip to content

Commit 61f4fa3

Browse files
committed
Add test for #9235
1 parent e6a115c commit 61f4fa3

File tree

4 files changed

+234
-0
lines changed

4 files changed

+234
-0
lines changed
Lines changed: 212 additions & 0 deletions
Loading

lib/matplotlib/tests/test_axes.py

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

970970

971+
@image_comparison(baseline_images=['fill_between_interpolate_decreasing'],
972+
style='mpl20', remove_text=True)
973+
def test_fill_between_interpolate_decreasing():
974+
p = np.array([724.3, 700, 655])
975+
t = np.array([9.4, 7, 2.2])
976+
prof = np.array([7.9, 6.6, 3.8])
977+
978+
fig = plt.figure(figsize=(9, 9))
979+
ax = fig.add_subplot(1, 1, 1)
980+
981+
ax.plot(t, p, 'tab:red')
982+
ax.plot(prof, p, 'k')
983+
984+
ax.fill_betweenx(p, t, prof, where=prof < t,
985+
facecolor='blue', interpolate=True, alpha=0.4)
986+
ax.fill_betweenx(p, t, prof, where=prof > t,
987+
facecolor='red', interpolate=True, alpha=0.4)
988+
989+
ax.set_xlim(0, 30)
990+
ax.set_ylim(800, 600)
991+
992+
971993
@image_comparison(baseline_images=['symlog'])
972994
def test_symlog():
973995
x = np.array([0, 1, 2, 4, 6, 9, 12, 24])

0 commit comments

Comments
 (0)