Create tangent line derivative line animation with plots got errors
using Plots function animate_tangent_line() x = -5:0.1:5 y = x.^2 anim = @animate for i in 1:length(x) plot(x, y, xlims=(-5,5), ylims=(-5,25), legend=false) plot!(x, x[i]*(x .- x[i]) .+ y[i], xlims=(-5,5), ylims=(-5,25), color=:red) end