Matthew Turk avatar Matthew Turk committed a4fc9e5

A few notes about using the IPython notebook.

Comments (0)

Files changed (2)

source/interacting/index.rst

 
    scripts
    interactive_prompt
+   ipython_notebook
    command-line
    reason
    mapserver

source/interacting/ipython_notebook.rst

+IPython Notebook
+================
+
+Starting with 2.4, yt ships with several functions and helpers to display
+information in the IPython web notebook.
+
+.. note:: The IPython necessary dependencies (0MQ, Py0MQ, Tornado and IPython)
+          come with the yt install script.  However, you should read in detail
+          the `IPython documentation
+          <http://ipython.org/ipython-doc/stable/interactive/htmlnotebook.html>`__
+          for how to use it.
+
+A sample notebook, demonstrating some of the functionality of both yt 2.4 and
+the IPython notebook (as exposed through yt) can be found at
+http://yt-project.org/files/yt24demo.ipynb .
+
+There are two main things that yt exposes to the IPython notebook: displaying
+PlotWindow objects and displaying Volume Renderings.  Both of these are exposed
+through the ``show`` method.  For instance:
+
+.. code-block:: python
+
+   slc = SlicePlot(pf, "x", "Density")
+   slc.show()
+
+Or with a volume rendering, call ``show`` on the camera:
+
+.. code-block:: python
+
+   cam = pf.h.camera([0.5, 0.5, 0.5], [0.2, 0.3, 0.4], 0.10, 1024, tf)
+   cam.show()
+
+In both of these cases, an image will appear in the cell output.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.