nat-stress-test/plot.py

25 lines
422 B
Python
Raw Normal View History

2024-06-15 19:43:10 +02:00
import plotly.express as px
ys = []
xs = []
with open("data.txt") as file:
for line in file.readlines():
print(line)
try:
y, x = map(float, line.split(" "))
except Exception as e:
print(e)
ys.append(y)
xs.append(x)
fig = px.scatter(
x=xs,
y=ys,
labels=dict(
x="connected at (s)",
y="connection number",
),
)
fig.show()