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

Skip to content

Commit a1b7970

Browse files
committed
Fix test_colorbar_single_scatter.
1 parent 5cd1494 commit a1b7970

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/matplotlib/tests/test_colorbar.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,8 @@ def test_colorbar_single_scatter():
196196
# the norm scaling within the colorbar must ensure a
197197
# finite range, otherwise a zero denominator will occur in _locate.
198198
plt.figure()
199-
x = np.arange(4)
200-
y = x.copy()
201-
z = np.ma.masked_greater(np.arange(50, 54), 50)
199+
x = y = [0]
200+
z = [50]
202201
cmap = plt.get_cmap('jet', 16)
203202
cs = plt.scatter(x, y, z, c=z, cmap=cmap)
204203
plt.colorbar(cs)

0 commit comments

Comments
 (0)