I have a bit of a strange issue.
I have a Matplotlib FuncAnimation that runs correctly in a standalone script in IPython. It also runs correctly if I copy the entire script into a notebook cell and run it after the following magic
%matplotlib notebook
However, if I use the following two magics
%matplotlib notebook
%run myscript.py
the animation does not run correctly.
I'd prefer to use $run so that I can pass command line arguments to the script.
Any ideas why using the two magics approach would not work, but pasting the entire script into a cell does?