You have specific data points in my program that remains the same. I am trying to fit a line with through data by doing iterated updates. I want to see how the line changes (moves) while updating parameters for this line.
In specific I am doing gradient descent and I am trying to see how each update changes the angle and position of the line to best fit the data.
Right now I got this:
fig = plt.figure()
ax1 = fig.add_subplot(211)
ax1.scatter(xs, ys)
plt.plot(xs, thetas[0] + thetas[1] * xs, color='red')
plt.show()
Which results in something like this:

As you can see I also have a hard time of plotting a continuous line. Now I need to update the red line. Any ideas? thetas[0] and thetas[1] are updates in a for loop after which the plot needs to be updated as well..