I have this annoying problem in Raspbbery Pi 4, running Thonny. I use plt.pause(t), where t is time delay in second, and it works showing the figure.