-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLineChartTutorial.py
More file actions
40 lines (28 loc) · 811 Bytes
/
LineChartTutorial.py
File metadata and controls
40 lines (28 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from bridges.bridges import *
from bridges.line_chart import *
import sys
import array
from BRIDGES_API import USERNAME
from BRIDGES_API import BRIDGES_API
def main():
bridges = Bridges(5, USERNAME, BRIDGES_API)
# create the Bridges object, set credentials
bridges.set_title ("Test Line Chart Tutorial")
plot = LineChart()
plot.title = "Line Chart Plot"
# set the data
x1 = [1, 3, 5, 20]
y1 = [2, 3, 5, 20]
plot.set_data_series("1", x1, y1)
bridges.set_data_structure(plot)
bridges.visualize()
x2 = [2, 15.2, 40]
y2 = [4, 30.5, 400.99]
plot.set_data_series("2", x2, y2)
bridges.visualize()
plot.logarithmicx = True
bridges.visualize()
plot.mouse_track = True
bridges.visualize()
if __name__ == "__main__":
main()