Skip to content

Commit 6b896d8

Browse files
committed
Tweak contour colorscale logic since carpet may set infinities
1 parent 4bcf438 commit 6b896d8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/traces/contour/make_color_map.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ module.exports = function makeColorMap(trace) {
2121
nc = Math.floor((end - start) / cs) + 1,
2222
extra = contours.coloring === 'lines' ? 0 : 1;
2323

24+
if(!isFinite(cs)) {
25+
cs = 1;
26+
nc = 1;
27+
}
28+
2429
var scl = trace.colorscale,
2530
len = scl.length;
2631

0 commit comments

Comments
 (0)