How to remove contour lines in plotly.js contour graph

I went through the documentation, and could not find a solution to remove the black countour lines on the graph.
image

Hi @Piggy_chen ! Welcome on the forum :tada:

I think I found the property you’re looking for:

 line:{
    width:0
  }

Here is an example:

Code
var data = [ {
  z: [[10, 10.625, 12.5, 15.625, 20],
       [5.625, 6.25, 8.125, 11.25, 15.625],
       [2.5, 3.125, 5., 8.125, 12.5],
       [0.625, 1.25, 3.125, 6.25, 10.625],
       [0, 0.625, 2.5, 5.625, 10]],
  type: 'contour',
  contours: {
    coloring: 'heatmap'
  },
  line:{
    width:0
  }
}];

Plotly.newPlot('myDiv', data);

It can happen that there is no example in the docs for some features, if that’s case you can try to take a look in other libraries, typically in python, the properties are the same.
Here where I found the line.width prop:

And go the the figure reference, where you can find all the properties:

2 Likes