Bonjour à tous,
J'ai voulu visualiser en temps réel des données que je les traites.
Donc, j'ai créé la fonction suivante que je l'appelle dans une boucle:
Sauf que j'ai eu l'erreur suivante:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 import matplotlib.pyplot as plt def plot(detections): temp1=[] tempx=[] tempy=[] for g in range(len(detections)): temp1=detections[g] tempx.append(temp1[0]) tempy.append(temp1[1]) plt.clf() plt.scatter(tempx,tempy) plt.pause(0.1)
Quelqu'un pourrait m'aider, svp?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 UserWarning: Starting a Matplotlib GUI outside of the main thread will likely fail. plt.clf() UserWarning: Starting a Matplotlib GUI outside of the main thread will likely fail. plt.pause(0.1) qt_compat.py", line 226, in _maybe_allow_interrupt old_wakeup_fd = signal.set_wakeup_fd(wsock.fileno()) ValueError: set_wakeup_fd only works in main thread
Merci
Partager