# Turn off interactivity between commands. Make it a habit, and it won't # matter if somebody left pl.ion()! # Forgetting it is slow but OK for newbies. pl.ioff() # Unless you really want to overlay on whatever was there before... pl.clf() # The group of plot commands. pl.plot(x0, y0) pl.plot(x1, y1) # etc. pl.xlabel("x axis (units)") pl.ylabel("y axis (units)") pl.title(ms) # Anything but "y axis vs. x axis"! # Do this *before* pl.show(), or you'll lose the prompt and force the user to # kill the plot window! # It also allows the user to change the title, etc. # Not needed if plotting straight to a file, but it should be harmless. pl.ion() pl.show() # Ta da!