Jupyter notebook not showing all the images

Hi,

I use %matplotlib notebook along with the imshow() function to generate interactive images. However, in this setup, the images remain blank until the code finishes executing. If my code generates large amount of images, such as 20 or 30 at once, after the execution is complete some of the images appear properly, while others are displayed as blank frames. Is there a solution to address this issue and ensure all the images are displayed correctly?

I am not trying to generate animations. My code processes a bunch of images and show them on the screen. ‘%matplotlib notebook’ makes them interactive meaning I can see the value of each pixel by hovering my mouse cursor over the image