Jupyter notebook is a browser-based editor and graphical interface to the IPython shell; it must connect to a running Python process in order to execute code. This process (known as a "kernel") can be started by running the following command in your system shell:
$ jupyter notebook
viene avviata una finestra del browser di default, contenente il notebook.
%matplotlib inline
import matplotlib.pyplot as plt
%matplotlib notebook
interactive plot%matplotlib inline
static
plotimport numpy as np x = np.linspace(0, 10, 100) plt.plot(x, np.sin(x), '-') plt.plot(x, np.cos(x), '--')
fig = plt.figure()
plt.plot(x, np.sin(x), '-') plt.plot(x, np.cos(x), '--')
fig.savefig('my_figure.png')
save in the current working directory
! dir my_figure.png
from IPython.display import Image Image('my_figure.png')