-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotting.py
More file actions
22 lines (17 loc) · 765 Bytes
/
plotting.py
File metadata and controls
22 lines (17 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#test changes
import pandas as pd
import plotly.graph_objects as go
from plotly.subplots import make_subplots
df = pd.read_csv('/home/brn/speedtest.csv')
fig = make_subplots(specs=[[{"secondary_y": True}]])
fig.add_trace(go.Scatter(x = df['Timestamp'], y = df['Download'],
name='Download (bps)'), secondary_y=False)
fig.add_trace(go.Scatter(x = df['Timestamp'], y = df['Ping'],
name='Ping (msec)'), secondary_y=True)
fig.update_layout(title='Vodafone home internet connection',
plot_bgcolor='rgb(230, 230,230)',
showlegend=True)
fig.update_xaxes(title_text="Time")
fig.update_yaxes(title_text="Speed", secondary_y=False)
fig.update_yaxes(title_text="Ping", secondary_y=True)
fig.show()