Creating a Gradient Descent Animation in Python

How to plot the trajectory of a point over a complex surface

Luis Medina
Towards Data Science
10 min readNov 11, 2023

--

Photo by Todd Diemer on Unsplash

Let me tell you how I created an animation of gradient descent just to illustrate a point in a blog post. It was worth it since I learned more Python by doing it and unlocked a new skill: making animated plots.

--

--

I'm a Mechanical Engineer who likes coding. I write about Data Science and Analytics, Programming, and Life. Sometimes hobby electronics and 3d printing.