Use pyplot's pause due to its event loop

master
LEdoian 10 months ago
parent 34be65e081
commit 5ac849d00e

@ -6,7 +6,6 @@ import json
from datetime import datetime
from dataclasses import dataclass
from collections import defaultdict
from time import sleep
from pathlib import Path
api_url = r'https://review.video.fosdem.org/api/v1/event/1/overview'
@ -63,7 +62,7 @@ def main():
plt.stackplot(x, *ys)
plt.show(block=False)
sleep(poll_rate)
plt.pause(poll_rate)
plt.close()
plt.clf()

Loading…
Cancel
Save