What I found on the subject of closing pyplot windows is that it really probably shouldn't be done using pyplot. SRK gives a great example on how to handle plots that will be updated in his answer below. Also I have stumbled across how to put pyplot plots into a Tkinter window, and Tkinter is much more adept at opening and closing windows than pyplot. Here is how to put a pyplot plot into a Tk window also this is a good example.

/Final Edit

I would like to be able to display several plots and then be able to close (remove from screen) them individually from some code input, but I don't know the code input to do this.

Below is what I have tried so far. I have played around with the position of the show and close commands, but the only real result I have gotten from this is to have one or the other plot not come up, but I have not been able to remove a plot from the screen. I have been inserting a raw_input() to create pauses.

Edit: These plots are being called from a Tkinter gui and if there is a better way to do this from that direction I would be glad to hear it.

The first line creates a new axes for the slider (called axsliderA), the second line creates a slider instance sA which is placed in the axes, and the third line specifies a function to call when the slider value changes (update).

A note about the above: When I run the application, the code runs sequentially right through (it stores the update function in memory, I think), until it hits show(), which is blocking. When you make a change to one of the sliders, it runs the update function from memory (I think?).

This is the reason why show() is implemented in the way it is, so that you can change values in the background by using functions to process the data.

Thanks. So, what does this mean for my closing the shown plot? I guess the real question I have then it how do I deal with the windows created by the plt.show() function. Do you have any other ideas to handle that?
–
deadstumpJun 21 '12 at 15:42

Can you give me more of an idea of what you're trying to do? Usually I allow the user to close the windows, or detect when the main window is closed, and then close them all. It's not very common to close windows from within the code in the way you suggest.
–
StaceyJun 21 '12 at 15:46

I have a Tk gui that when asked will produce the plots, and if the user needs to tweak the plots then some variables are tweaked and the plots regenerated w/ tweaks. I just wanted to cut down on user input and have the program destroy the old plots before it makes the new ones, but I guess it would not be the end of the world if the user had to manually do this. Are you saying manual is the way to go in this case? Thanks!
–
deadstumpJun 21 '12 at 15:50