How to animate a heatmap in matplotlib

preview_player
Показать описание
Link to repo:

At 4:51 I write in the code and say that the "background_pic" needs to be added to the "im_ax". If its ok that the background is a bit invisible and one wants to speed up rendering one can skip adding it to im_ax and tune alpha instead.

One thing I didn't talk about at all is how to generate the heatmap numpy array. The smoothness of the hot areas (which isn't looking that smooth actually now that I think about it), was achieved using scipy's "gaussian_filter". So if one starts with data that has a lot of big values at sparse locations in the 2D array, one can then try smooth these dots out. One could also try to estimate some 3D surface over the data.
Рекомендации по теме
join shbcf.ru