Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
- </head>
- <body>
- <div style="width:400px;height:400px" id="myDiv"></div>
- <script>
- var numberX = 1;
- var numberY = 1;
- var data = [
- {
- x: [1, numberX],
- y: [2, numberY],
- type: 'scatter'
- }
- ];
- Plotly.newPlot('myDiv', data);
- setInterval(function(){
- numberX++;
- numberY++;
- var data = [
- {
- x: [1, numberX],
- y: [2, numberY],
- type: 'scatter'
- }
- ];
- Plotly.newPlot('myDiv', data);
- }, 1000);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement