I want to plot a temperature as a function of time. For this I have two linked array: one for the time value and the other for the temperature. The time can be a value ranging from 0 to 24 representing the hours. The arrays are filled every 4 minutes and I want to forget the very first record taken 24 hours ago. (I using pop(0) on both array for doing this) fig_temp = plt.figure(2) x_temp_arr.append(temps) y_temp_arr.append(temperature) if 1+len(x_temp_arr) > 40/deltat: x_temp_arr.pop(0) y_temp_arr.pop(0) plt.title ("outside temperature : " + time.strftime('%d %B %Y') + " / " + str(temperature) + " C") ax_temp.set_ylim (min(y_temp_arr)- 0.2,max(y_temp_arr) + 0.2) ax_temp.plot (x_temp_arr,y_temp_arr, color='red', lw=1) plt.draw() My problem is aldo the arrays are purged (FIFO), the plt.draw keep erased records and the plot extend indefinitely. Any idea why? What would be the solution. Thanks in advance for the answers. Continue reading...