Problems "animated" plot


John Hunter <jdhunter@...4...> writes:


OK, that helps. The update of the data limits happens when you call
plot and friends (technically plot calls ax.add_line which calls
ax.update_datalim_numerix) . If you manually set the xdata or ydata
on the line object, you need to manually update the Axes datalim with

ax = gca()
for i in range(2*cycles):
    voltages = number_of_values * [i % 2 + 3]
    y_values[i * number_of_values : (i+1) * number_of_values] = \
    ax.update_datalim_numerix(x_values, y_values)


However, the datalim seems so implicitly include zero. For example,
if min(y_values) is 3, I still see the point of origin. How can I
avoid this behaviour?



Torsten Bronger, aquisgrana, europa vetus