You can add it to the Jupyter server's profile. See this Stack Overflow answer <http://stackoverflow.com/questions/21176731/automatically-run-matplotlib-inline-in-ipython-notebook> for pretty much your exact scenario.
Cheers! -Adrian On Mon, Aug 22, 2016 at 10:08 AM, Ryan Krauss <[email protected]> wrote: > I am having a hard time getting a good answer to what I think is a simple > question. I want my students to try the jupyter notebook and I think we > will pretty much always need these 3 lines at the start of every notebook > file: > > %matplotlib inline > import matplotlib.pyplot as plt > import numpy as np > > What is the easiest way to prevent them from having to re-type those lines > every time? Keep in mind that many of my students will be learning python > from scratch as we start my class. > > Thanks, > > Ryan > > -- > You received this message because you are subscribed to the Google Groups > "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jupyter/e7047efc-7a68-4ee2-9aa9-aa912ee81df5%40googlegroups.com > <https://groups.google.com/d/msgid/jupyter/e7047efc-7a68-4ee2-9aa9-aa912ee81df5%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAFaB7Ramv56yzkC8XTdCr7cUTZR2XZvwpc_g7G_RZyUHQwp-4w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
