{"record":{"id":"0b8189202bcc324d","repo":"plotly/plotly.js","slug":"too-many-contours-clipping-at-1000","errorCode":null,"errorMessage":"Too many contours, clipping at 1000","messagePattern":"Too many contours, clipping at 1000","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/traces/contour/empty_pathinfo.js","lineNumber":49,"sourceCode":"\n    for(var ci = contoursFinal.start; ci < end; ci += cs) {\n        pathinfo.push(Lib.extendFlat({\n            level: ci,\n            // all the cells with nontrivial marching index\n            crossings: {},\n            // starting points on the edges of the lattice for each contour\n            starts: [],\n            // all unclosed paths (may have less items than starts,\n            // if a path is closed by rounding)\n            edgepaths: [],\n            // all closed paths\n            paths: [],\n            z: cd0.z,\n            smoothing: cd0.trace.line.smoothing\n        }, basePathinfo));\n\n        if(pathinfo.length > 1000) {\n            Lib.warn('Too many contours, clipping at 1000', contours);\n            break;\n        }\n    }\n    return pathinfo;\n};\n","sourceCodeStart":31,"sourceCodeEnd":55,"githubUrl":"https://github.com/plotly/plotly.js/blob/1d090e0b5ffb8d0fdf6e0e4ff51d3f3cf67f1314/src/traces/contour/empty_pathinfo.js#L31-L55","documentation":"Safety cap in empty_pathinfo (contour/heatmap contour extraction). The code walks contour levels from contoursFinal.start to end in steps of cs, pushing a pathinfo object per level. For pathological settings — extremely small contours.size relative to a large start/end span — this loop would create an unbounded number of levels, so when more than 1000 levels would be generated the loop stops and the excess contours are clipped. This is a warning-style protection, not a data error: the plot still renders with at most 1000 contour levels.","triggerScenarios":"Thrown at src/traces/contour/empty_pathinfo.js:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Increase contours.size (or set contours.showline/type sensibly) so fewer than 1000 levels span the range.","Narrow contours.start/end to the region of interest instead of tiny steps over a wide range.","Use contours coloring 'fill' or 'heatmap' instead of many discrete lines if fine gradations are needed."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1d090e0b5ffb8d0fdf6e0e4ff51d3f3cf67f1314","analyzedAt":"2026-09-02T22:03:39.906Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}