I have two figures that I would like to plot in a subplot:
fig = plt.figure()
ax1 = fig.add_subplot(1,2,1)
ax2 = fig.add_subplot(1,2,2)
Assume that ax1 is going to be populated with an animation which adds points ( a scatter plot). Ax2 then bins these points to a meshgrid and displays the density.
Can I display the animation in subplot 1, and on completion add the density image to subplot2?
This should be possible. Please take a look at the example. You may also check the previous question:
Simple animation of 2D coordinates using matplotlib and pyplot
Below is a sample implementation. The second plot is hidden until the first stops rendering: