I am relatively new at programming, so I apologize in advance if anything is unclear:
The program that I am working on finds the position of certain facial landmarks in a webcam and plots lists of position values in matplotlib's PyPlot. The program struggles to track seven different landmarks at once, running at ~2 frames per second when trying to do so.
Here is the basic idea:
fig1 = plt.figure("Facial Landmark Positions")
ax1 = fig1.add_subplot(2,4,1)
a_list = []
while True:
ab,cd,... = datavalues #Data comes in a list of ordered pairs
a,b = ab
a_list.append(a)
ax1.clear()
ax1.plot(timevalues,a_list)
plt.pause(0.01)
plt.show(block=False)
Most likely, I will just reduce the number of landmarks the program is tracking, but I am just curious: Is there a faster way to update lists?