Show More
@@ -1,16 +1,15 b'' | |||
|
1 | 1 | .. _kernel_install: |
|
2 | 2 | |
|
3 | 3 | Kernel Installation |
|
4 | 4 | ------------------- |
|
5 | 5 | |
|
6 |
IPython can be installed (different python versions, virtualenv or conda |
|
|
7 |
|
|
|
6 | IPython can be installed (different python versions, virtualenv or conda | |
|
7 | environments) as a kernel by following these steps: | |
|
8 | 8 | |
|
9 | 9 | * make sure that the desired python installation is active (e.g. activate the environment) |
|
10 | 10 | and ipython is installed |
|
11 | 11 | * run once ``ipython kernelspec install-self --user`` (or ``ipython2 ...`` or ``ipython3 ...`` |
|
12 | 12 | if you want to install specific python versions) |
|
13 | 13 | |
|
14 | The last command installs a kernel spec file for the current python installation in | |
|
15 | ``~/.jupyter/kernels/``. Kernel spec files are JSON files, which can be viewed and changed with a | |
|
14 | The last command installs a :ref:`kernel spec <jupyterclient:kernelspecs>` file for the current python installation. Kernel spec files are JSON files, which can be viewed and changed with a | |
|
16 | 15 | normal text editor. |
@@ -1,17 +1,18 b'' | |||
|
1 | 1 | ================================== |
|
2 | 2 | Using IPython for interactive work |
|
3 | 3 | ================================== |
|
4 | 4 | |
|
5 | 5 | .. toctree:: |
|
6 | 6 | :maxdepth: 2 |
|
7 | 7 | |
|
8 | 8 | tutorial |
|
9 | tips | |
|
10 | reference | |
|
11 | 9 | magics |
|
12 | shell | |
|
10 | plotting | |
|
13 | 11 | qtconsole |
|
12 | reference | |
|
13 | shell | |
|
14 | tips | |
|
14 | 15 | |
|
15 | 16 | .. seealso:: |
|
16 | 17 | |
|
17 | 18 | `The Jupyter Notebook <http://jupyter-notebook.readthedocs.org/en/latest/>`__ |
@@ -1,34 +1,36 b'' | |||
|
1 | 1 | .. _plotting: |
|
2 | 2 | |
|
3 | 3 | Plotting |
|
4 | 4 | -------- |
|
5 |
One major feature of the |
|
|
5 | One major feature of the IPython kernel is the ability to display plots that | |
|
6 | 6 | are the output of running code cells. The IPython kernel is designed to work |
|
7 | 7 | seamlessly with the matplotlib_ plotting library to provide this functionality. |
|
8 | 8 | |
|
9 | 9 | To set this up, before any plotting is performed you must execute the |
|
10 | 10 | ``%matplotlib`` :ref:`magic command <magics_explained>`. This performs the |
|
11 | 11 | necessary behind-the-scenes setup for IPython to work correctly hand in hand |
|
12 | 12 | with ``matplotlib``; it does *not*, however, actually execute any Python |
|
13 | 13 | ``import`` commands, that is, no names are added to the namespace. |
|
14 | 14 | |
|
15 | 15 | If the ``%matplotlib`` magic is called without an argument, the |
|
16 | 16 | output of a plotting command is displayed using the default ``matplotlib`` |
|
17 | 17 | backend in a separate window. Alternatively, the backend can be explicitly |
|
18 | 18 | requested using, for example:: |
|
19 | 19 | |
|
20 | 20 | %matplotlib gtk |
|
21 | 21 | |
|
22 | 22 | A particularly interesting backend, provided by IPython, is the ``inline`` |
|
23 | 23 | backend. This is available only for the Jupyter Notebook and the |
|
24 |
:ref:` |
|
|
24 | :ref:`Jupyter QtConsole <qtconsole>`. It can be invoked as follows:: | |
|
25 | 25 | |
|
26 | 26 | %matplotlib inline |
|
27 | 27 | |
|
28 | 28 | With this backend, the output of plotting commands is displayed *inline* |
|
29 | 29 | within the notebook, directly below the code cell that produced it. The |
|
30 | 30 | resulting plots will then also be stored in the notebook document. |
|
31 | 31 | |
|
32 | 32 | .. seealso:: |
|
33 | 33 | |
|
34 | 34 | `Plotting with Matplotlib`_ example notebook |
|
35 | ||
|
36 | .. include:: ../links.txt |
General Comments 0
You need to be logged in to leave comments.
Login now