trace1 = { type: 'scatter', x: [1.5, 2, 3, 4], y: [10, 15, 13, 17], mode: 'lines', name: 'Red', line: { color: 'rgb(219, 64, 82)', width: 8 } }; trace2 = { type: 'scatter', x: [1, 2, 3, 4], y: [12, 9, 15, 12], mode: 'lines', name: 'Blue', line: { color: 'rgb(55, 128, 191)', width: 3 } }; var layout = { width: 800, height: 600 }; var data = [trace1, trace2]; Plotly.newPlot('myDiv', data, layout);
Try
Select all
Created by
David Ashley
Original:
plot.ly/javascript/
Download php
Download js
Preset examples:
0
1
2
3
4
5
6
7
8
9
10
11
12