How to leave matplotlib figure opened after script ends?
<p>Suppose I have the following script plotting a graph for me:</p>

<pre><code>import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np

img = mpimg.imread('stinkbug.png')
#circle = plt.Circle((0, 0), radius=0.5, fc='y')
circle = plt.Circle((0, 0), radius=100, fill=False, color='b')

fig, ax = plt.subplots()
ax.imshow(img)
ax.add_artist(circle)
fig.show()
pass
</code></pre>

<p>Unfortunately, the figure closes after the script ends. </p>

<p>How to prevent that?</p>

<p><strong>UPDATE</strong></p>

<p>If it is impossible for the figure to survive the script, then what is the reason for it? What is the connection between the figure and the script?</p>