diff options
author | Anthony Wang | 2024-03-25 14:02:49 -0500 |
---|---|---|
committer | Anthony Wang | 2024-03-25 14:02:49 -0500 |
commit | cac8bed72c82d1b568785b3476a2edfb1be83142 (patch) | |
tree | 54a9156ddf2ce6fd43152d8a55a7af7c42264935 /main.py | |
parent | 88ac4ce7dc40f66755414d551b181bc43f5cf4d0 (diff) |
Simplify main.py code
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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() |