I need to update a plot continuously and if I use
ax1.clear()
ax.plot(y)
fig.show()
It work well, but allocate memory for each update and take all CPU resource
after a while.
To solve the memory allocation problem I used
line.set_xdata()
line.set_ydata()
plt.draw()
But I can't find how to use set_data() and draw() for a subplot.
I am not sure what you mean by "set_data() and draw() for a subplot.".
If you have a reference to the `Line2D` object, a call to `set_data` will
update the x, y values for that line.
Tom
···
On Fri, Oct 9, 2015 at 7:19 AM Lars Eriksson <info at lbm.nu> wrote:
I need to update a plot continuously and if I use
ax1.clear()
ax.plot(y)
fig.show()
It work well, but allocate memory for each update and take all CPU resource
after a while.
To solve the memory allocation problem I used
line.set_xdata()
line.set_ydata()
plt.draw()
But I can't find how to use set_data() and draw() for a subplot.