summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorAnthony Wang2024-03-25 14:02:49 -0500
committerAnthony Wang2024-03-25 14:02:49 -0500
commitcac8bed72c82d1b568785b3476a2edfb1be83142 (patch)
tree54a9156ddf2ce6fd43152d8a55a7af7c42264935 /main.py
parent88ac4ce7dc40f66755414d551b181bc43f5cf4d0 (diff)
Simplify main.py code
Diffstat (limited to 'main.py')
-rw-r--r--main.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.py b/main.py
index d9a9c01..9ef6936 100644
--- a/main.py
+++ b/main.py
@@ -8,11 +8,11 @@ with open('index.html') as f:
for l in f.readlines():
if l.startswith('<div'):
s = l.split(':')
- y.append(10 - int(float(s[3].split('px')[0]) / 50))
- x.append(int(float(s[4].split('px')[0]) / 50))
- cnt += 1
- if cnt % 80 == 0:
- axs[((cnt - 1) // 80) // 5, ((cnt - 1) // 80) % 5].scatter(x, y)
+ y.append(10 - float(s[3].split('px')[0]) // 50)
+ x.append(float(s[4].split('px')[0]) // 50)
+ if cnt % 80 == 79:
+ axs[(cnt // 80) // 5, (cnt // 80) % 5].scatter(x, y)
x = []
y = []
+ cnt += 1
plt.show()