To get the matplotlib figure to display in a separate window you could try to add plt.show() at the end of your script (plt coming from the classic import matplotlib.pyplot as plt).
Ok I see. plot.show() doesn’t work if the Figure hasn’t been created with the pyplot interface. In the getting started page there’s no need to use the pyplot interface because it runs in a notebook that has this line %matplotlib inline that turns the Figure representation into an actual plot.
The pyplot interface isn’t used in the getting started (and elsewhere) because of some potential memory leaks that could happen, see the reference documentation of the Matploblib pane:
Note that the examples below do not make use of the common matplotlib.pyplot API in order to avoid having to close the figure. If not closed, it could cause memory leaks and cause the inline backend to automatically display the figure. It is actually as simple as creating a matplotlib.Figure object, registering axes to this figure, and passing the figure to the Matplotlib pane that will take care of rendering it.