Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<html>
  <head>
    <meta name="description" content="Real-time plot">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>SigPlot JS Fiddle</title>
    <script src="https://cdn.jsdelivr.net/npm/sigplot/dist/sigplot-debug.js"></script>
  </head>
  <body>
    <div id="plot">
    </div>
  </body>
</html>
 
var rt_plot = new sigplot.Plot(document.getElementById('plot'), {
  autohide_readout: true, // only show the readout when the mouse is over the plot
  autohide_panbars: true // only show panbars when necessary and the mouse is over the plot
})
var lyr1 = rt_plot.overlay_array([], {
  file_name: "random1"
});
var lyr2 = rt_plot.overlay_array([], {
  file_name: "random2"
});
function update_rtplot() {
  var random1 = [];
  var random2 = [];
  for (var i = 0; i <= 1000; i += 1) {
    random1.push(Math.random());
    random2.push(Math.random() + 1)
  }
  rt_plot.reload(lyr1, random1);
  rt_plot.reload(lyr2, random2);
}
var hdl = window.setInterval(update_rtplot, 500);
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers