It has come to my attention that in Anaconda for Windows and Mac OS X, plots invoked from a Jupyter Notebook are non-interactive and embedded in the notebook instead of popping up in an independent interactive window.
Here is a way to get an interactive plot that supports zooming and panning and gives you the coordinates of the pointer.
Uncheck "Hide extensions for known file types"
Click the Window icon at the lower left corner of your screen and type "command": choose Command Prompt. A black window will appear.
Make a mental note of the folder that is the default working folder. (This is what is shown as the prompt. It might be something like "C:\Users\LadyGaga".)
Open "Notepad", and copy and past the Python code into it. Use "Save As ..." to save the file in the working folder noted above as "plot_spectrum.py".
Notepad will tack on a ".txt" extension that we don't want.
Using your file explorer, remove the ".txt" extension from your Python code file by renaming it.
Click "Yes" when it asks you if you really want to do this.
Using the file explorer, move the .wav file to same folder you put your .py file in.
In the Command Prompt, type
python plot_spectrum.py
Your interactive graphics window should pop up. Clicking the magnifying-glass button allows you to zoom to a rectangle of your choice. The arrow button beside that allows you to pan across your plot. The "home", "back" and "forward" buttons allow you to re-visit previous views.
Any suggestions from Windows experts on improving this procedure would be most appreciated.
Do a similar process. You use a "terminal" instead of a "Command Prompt", and your default text editor is called "textedit" instead of "notepad".