I have a 2D grid 50*50. For each location I have an intensity value(i.e data is like (x,y,intensity)
for each of those 50*50 locations). I would like to visualize the data as a heatmap.
The twist is that every second the intensity will change(for most of the locations), which means I will need to re-draw the heatmap every second. I am wondering what is the best library/approach to handle this kind of real-time varing heatmap.
This really depends on how you get your data, but:
This should draw 11 random 50x50 images with 1 second intervals. The essential part is
im.set_array
which replaces the image data andfig.canvas.draw
which redraws the image onto the canvas.If your data is really a list of points in the form
(x, y, intensity)
, you can transform them into anumpy.array
: