yt-doc / 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.


The IPython necessary dependencies (0MQ, Py0MQ, Tornado and IPython) come with the yt install script. However, you should read in detail the IPython documentation 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 .

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:

slc = SlicePlot(pf, "x", "Density")

Or with a volume rendering, call show on the camera:

cam =[0.5, 0.5, 0.5], [0.2, 0.3, 0.4], 0.10, 1024, tf)

In both of these cases, an image will appear in the cell output.