Short example of using matplotlib within jupyter

From Simson Garfinkel
Revision as of 08:32, 15 June 2016 by Simson (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Enter this:

   %matplotlib inline
   import matplotlib
   import numpy as np
   import matplotlib.pyplot as plt
   x = np.linspace(1,10)
   line, = plt.plot(x, np.sin(x), "--", linewidth=2)

And here is what it looks like:

Jupyter-matplotlib-demo.png

References