8000 Merge pull request #24344 from oscargus/testcolorbarextendalpha · matplotlib/matplotlib@0b6d370 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0b6d370

Browse files
authored
Merge pull request #24344 from oscargus/testcolorbarextendalpha
Add test for colorbar extend alpha
2 parents 1b17c9e + bf4fb54 commit 0b6d370

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Loading

lib/matplotlib/tests/test_colorbar.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,14 @@ def test_colorbar_set_formatter_locator():
11241124
assert cb.ax.yaxis.get_minor_formatter() is fmt
11251125

11261126

1127+
@image_comparison(['colorbar_extend_alpha.png'], remove_text=True,
1128+
savefig_kwarg={'dpi': 40})
1129+
def test_colorbar_extend_alpha():
1130+
fig, ax = plt.subplots()
1131+
im = ax.imshow([[0, 1], [2, 3]], alpha=0.3, interpolation="none")
1132+
fig.colorbar(im, extend='both', boundaries=[0.5, 1.5, 2.5])
1133+
1134+
11271135
def test_offset_text_loc():
11281136
plt.style.use('mpl20')
11291137
fig, ax = plt.subplots()

0 commit comments

Comments
 (0)
0