Plotlyjs更新表面图中的所有迹线

时间:2019-06-04 10:33:00

标签: 3d plotly surface plotly.js

我正在尝试在1秒后更新3d“表面”图的所有迹线,但到目前为止还行不通。

Plotly.newPlot('myDiv', traces, {}, {showSendToCloud: true});

setTimeout(function() {
    const newTraces = [{
      x:  [[23, 51],[23, 51],[23, 51],[23, 51]], 
      y: [[0, 0],[1, 1],[2, 2],[3, 3]], 
      z: [[108, 109],[115, 116],[108, 109],[111, 112]],
      name: '',
      type: 'surface',
      showscale: false 
  }];
    Plotly.update('myDiv', newTraces);
}, 1000);

Here is the CodePen

谢谢!

0 个答案:

没有答案