I was playing with this example code for a while now.
Use this statement in place of the similar one in the code.
poly = Polygon(list(zip(xs, ys)), animated=True, fc='w')
I can't help with adding a button. However, you could put the part of the code that creates the plot in a loop that prints what you want after
plt.show(), and includes an input statement offering the user another opportunity to use the facility before exiting.