Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title></title>
  5. <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
  6. </head>
  7. <body>
  8. <div style="width:400px;height:400px" id="myDiv"></div>
  9. <script>
  10. var numberX = 1;
  11. var numberY = 1;
  12.  
  13. var data = [
  14. {
  15. x: [1, numberX],
  16. y: [2, numberY],
  17. type: 'scatter'
  18. }
  19. ];
  20.  
  21. Plotly.newPlot('myDiv', data);
  22.  
  23. setInterval(function(){
  24. numberX++;
  25. numberY++;
  26.  
  27. var data = [
  28. {
  29. x: [1, numberX],
  30. y: [2, numberY],
  31. type: 'scatter'
  32. }
  33. ];
  34.  
  35. Plotly.newPlot('myDiv', data);
  36. }, 1000);
  37. </script>
  38.  
  39. </body>
  40. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement