matplotlib usage: getting a python prompt at the end of a script

Hello Folks,

At the end of a batch script using matplotlib, once I close the
plot window I'm getting a python prompt:


that waits for input.

I searched the docs but I did not see this
mentioned. What do I need to do to have the
script exit once I close the plot window?