On Monday, August 22, 2016 at 10:08:20 AM UTC-4, Ryan Krauss 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.
>

Perhaps having these loaded automatically is not the right approach. I 
appreciate that those three lines have nothing to do with what you want to 
teach. But magically having "np" and "plt" available without doing anything 
can also be confusing, especially if the students move to a different 
environment, or if you want to share your materials with others that have a 
standard environment.

I would reconsider, and perhaps just import those when you need them. Or, 
create a standard way of loading them (maybe a standard magic, or create 
your own). Maybe you want to create your own python module around 
matplotlib, to make it even easier?

-Doug
 

>
> 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/dd666fb2-5db6-45a5-8724-d312e988d99a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to