From f9aed7a23aaa8f6488d5c55848282deb4c1680f8 2015-08-10 19:05:52 From: Jonathan Frederic Date: 2015-08-10 19:05:52 Subject: [PATCH] Add files remove in https://github.com/jupyter/notebook/pull/124 --- diff --git a/docs/source/install/index.rst b/docs/source/install/index.rst index 0fd8fd9..2d84cfb 100644 --- a/docs/source/install/index.rst +++ b/docs/source/install/index.rst @@ -8,4 +8,5 @@ Installation :maxdepth: 2 install + kernel_install diff --git a/docs/source/install/kernel_install.rst b/docs/source/install/kernel_install.rst new file mode 100644 index 0000000..fa35b7a --- /dev/null +++ b/docs/source/install/kernel_install.rst @@ -0,0 +1,16 @@ +.. _kernel_install: + +Kernel Installation +------------------- + +IPython can be installed (different python versions, virtualenv or conda environments) can +be installed as a kernel by following these steps: + +* make sure that the desired python installation is active (e.g. activate the environment) + and ipython is installed +* run once ``ipython kernelspec install-self --user`` (or ``ipython2 ...`` or ``ipython3 ...`` + if you want to install specific python versions) + +The last command installs a kernel spec file for the current python installation in +``~/.jupyter/kernels/``. Kernel spec files are JSON files, which can be viewed and changed with a +normal text editor. diff --git a/docs/source/notebook/plotting.rst b/docs/source/notebook/plotting.rst new file mode 100644 index 0000000..b7e6324 --- /dev/null +++ b/docs/source/notebook/plotting.rst @@ -0,0 +1,34 @@ +.. _plotting: + +Plotting +-------- +One major feature of the Jupyter notebook is the ability to display plots that +are the output of running code cells. The IPython kernel is designed to work +seamlessly with the matplotlib_ plotting library to provide this functionality. + +To set this up, before any plotting is performed you must execute the +``%matplotlib`` :ref:`magic command `. This performs the +necessary behind-the-scenes setup for IPython to work correctly hand in hand +with ``matplotlib``; it does *not*, however, actually execute any Python +``import`` commands, that is, no names are added to the namespace. + +If the ``%matplotlib`` magic is called without an argument, the +output of a plotting command is displayed using the default ``matplotlib`` +backend in a separate window. Alternatively, the backend can be explicitly +requested using, for example:: + + %matplotlib gtk + +A particularly interesting backend, provided by IPython, is the ``inline`` +backend. This is available only for the Jupyter Notebook and the +:ref:`IPython QtConsole `. It can be invoked as follows:: + + %matplotlib inline + +With this backend, the output of plotting commands is displayed *inline* +within the notebook, directly below the code cell that produced it. The +resulting plots will then also be stored in the notebook document. + +.. seealso:: + + `Plotting with Matplotlib`_ example notebook