For a quick solution, use
ginput(1) to run the event event loop until you click once on the graph. It will keep the plot visible long enough to do a quick preview.
ginput(1) # view results of plot fn
ginput(1) # view results of xlabel and ylabel fns