{ "metadata": { "name": "", "signature": "sha256:86c779d5798c4a68bda7e71c8ef320cb7ba9d7e3d0f1bc4b828ee65f617a5ae3" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Custom Display Logic" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Overview" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As described in the [Rich Output](Rich Output.ipynb) tutorial, the IPython display system can display rich representations of objects in the following formats:\n", "\n", "* JavaScript\n", "* HTML\n", "* PNG\n", "* JPEG\n", "* SVG\n", "* LaTeX\n", "* PDF\n", "\n", "This Notebook shows how you can add custom display logic to your own classes, so that they can be displayed using these rich representations. There are two ways of accomplishing this:\n", "\n", "1. Implementing special display methods such as `_repr_html_` when you define your class.\n", "2. Registering a display function for a particular existing class.\n", "\n", "This Notebook describes and illustrates both approaches." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Import the IPython display functions." ] }, { "cell_type": "code", "collapsed": false, "input": [ "from IPython.display import (\n", " display, display_html, display_png, display_svg\n", ")" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Parts of this notebook need the matplotlib inline backend:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "%matplotlib inline\n", "import numpy as np\n", "import matplotlib.pyplot as plt" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Special display methods" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The main idea of the first approach is that you have to implement special display methods when you define your class, one for each representation you want to use. Here is a list of the names of the special methods and the values they must return:\n", "\n", "* `_repr_html_`: return raw HTML as a string\n", "* `_repr_json_`: return raw JSON as a string\n", "* `_repr_jpeg_`: return raw JPEG data\n", "* `_repr_png_`: return raw PNG data\n", "* `_repr_svg_`: return raw SVG data as a string\n", "* `_repr_latex_`: return LaTeX commands in a string surrounded by \"$\"." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As an illustration, we build a class that holds data generated by sampling a Gaussian distribution with given mean and standard deviation. Here is the definition of the `Gaussian` class, which has a custom PNG and LaTeX representation." ] }, { "cell_type": "code", "collapsed": false, "input": [ "from IPython.core.pylabtools import print_figure\n", "from IPython.display import Image, SVG, Math\n", "\n", "class Gaussian(object):\n", " \"\"\"A simple object holding data sampled from a Gaussian distribution.\n", " \"\"\"\n", " def __init__(self, mean=0.0, std=1, size=1000):\n", " self.data = np.random.normal(mean, std, size)\n", " self.mean = mean\n", " self.std = std\n", " self.size = size\n", " # For caching plots that may be expensive to compute\n", " self._png_data = None\n", " \n", " def _figure_data(self, format):\n", " fig, ax = plt.subplots()\n", " ax.hist(self.data, bins=50)\n", " ax.set_title(self._repr_latex_())\n", " ax.set_xlim(-10.0,10.0)\n", " data = print_figure(fig, format)\n", " # We MUST close the figure, otherwise IPython's display machinery\n", " # will pick it up and send it as output, resulting in a double display\n", " plt.close(fig)\n", " return data\n", " \n", " def _repr_png_(self):\n", " if self._png_data is None:\n", " self._png_data = self._figure_data('png')\n", " return self._png_data\n", " \n", " def _repr_latex_(self):\n", " return r'$\\mathcal{N}(\\mu=%.2g, \\sigma=%.2g),\\ N=%d$' % (self.mean,\n", " self.std, self.size)" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 3 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Create an instance of the Gaussian distribution and return it to display the default representation:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "x = Gaussian(2.0, 1.0)\n", "x" ], "language": "python", "metadata": {}, "outputs": [ { "latex": [ "$\\mathcal{N}(\\mu=2, \\sigma=1),\\ N=1000$" ], "metadata": {}, "output_type": "pyout", "png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAENCAYAAAASUO4dAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAElNJREFUeJzt3X+wXGV9x/H3JpefITfhCr1JSyCI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Gaussian at 0x106e7ae10>" ] } ], "prompt_number": 4 }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can also pass the object to the `display` function to display the default representation:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "display(x)" ], "language": "python", "metadata": {}, "outputs": [ { "latex": [ "$\\mathcal{N}(\\mu=2, \\sigma=1),\\ N=1000$" ], "metadata": {}, "output_type": "display_data", "png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAENCAYAAAASUO4dAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAElNJREFUeJzt3X+wXGV9x/H3JpefITfhCr1JSyCIRH5UJbQgrVhXChas\nDXE6onbaBoownRG0tVUSOg63vxQY+8tRoVOQuTIOSq3QQGtNiGyr1SK0IfxqTBNNB2zuhUJoLogk\nkO0fz9ncvZu9956z9+yefXbfr5mdPefZs7tPbnY/++z3POcsSJIkSZIkSZIkSZIkSZIkSZIkSZJ6\n1olFd6DNlgJHFt0JKYt5RXdAXe8sYAtwEyHEzym2O233DPCxojshZVEqugPqGjcD/wrc3tB+E/BV\n4EFgHXBNm57/1wij4bOBu4Avtel5Gp0B/Drw+3VtZwGnAl/oUB+m06xvq4HTgP3AD5n8/8raLqkH\nfQf424a204GLkuU3AVe36blfV/fYxwC76UwJ5yOED6nbmtyWJcTfTPjweQoYSNqGCR9G9wI/n1Pf\nFgH/Xrf+HeA1GduPaaEv6nKWVgQwH7gPOA84vK69DHwjWX5X3XLeTmeynPG/wHbgZ9r0XPX+HPj7\naW57hvABk8YDwD8B24BfTdrGCSH+HuDbOfXtF4An6ta3EP7PsrS/vYW+qMsNzL6J+sDpwCbCV/mL\nCKNLgCOAl5Pls4BPZHzc1wJXzHD7vxHC6h+ZHPmXCCWW7RmfK+tz1kxXXtxC+DBJ0495wD7g08BH\ngS8n7QuAl3Ls23HA83XrzwMnA89lbFePMcgFoS59O6EU8H5CkB8G7K3b5kigWrc+H/hn4Nxk/Vbg\nk0wNvu8T6uqz2Q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T4/BOp/\n0uW4pE1Tpf3b3kK2D00Fja/DZUz9pqjsdiXXzwB3EcpXBnnrxgmDuTFgKfD0bHdod2mlvm62Hngf\n4eChE4GTcQ93Vkvrlt/N1B0kSuchwmtvOeG1+F7Ca1OtORJYmCwvIMxG83U5N+uBNcnyGuDuIjrx\nbkIN8iXCJ8rX6m67lrCjaSvwS53vWvS+QJjmtYXwnztr7UxNeSBbfk4kzPx5GHgM/55Z3QH8D7CX\nkJuXEWYA3UfB0w8lSZIkSZIkSZIkSZIkSZIkSZIktcn/A4eK9UXawRDUAAAAAElFTkSuQmCC\n", "text": [ "<__main__.Gaussian at 0x106e7ae10>" ] } ], "prompt_number": 5 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Use `display_png` to view the PNG representation:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "display_png(x)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "display_data", "png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAENCAYAAAASUO4dAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAElNJREFUeJzt3X+wXGV9x/H3JpefITfhCr1JSyCIRH5UJbQgrVhXChas\nDXE6onbaBoownRG0tVUSOg63vxQY+8tRoVOQuTIOSq3QQGtNiGyr1SK0IfxqTBNNB2zuhUJoLogk\nkO0fz9ncvZu9956z9+yefXbfr5mdPefZs7tPbnY/++z3POcsSJIkSZIkSZIkSZIkSZIkSZIkSZJ6\n1olFd6DNlgJHFt0JKYt5RXdAXe8sYAtwEyHEzym2O233DPCxojshZVEqugPqGjcD/wrc3tB+E/BV\n4EFgHXBNm57/1wij4bOBu4Avtel5Gp0B/Drw+3VtZwGnAl/oUB+m06xvq4HTgP3AD5n8/8raLqkH\nfQf424a204GLkuU3AVe36blfV/fYxwC76UwJ5yOED6nbmtyWJcTfTPjweQoYSNqGCR9G9wI/n1Pf\nFgH/Xrf+HeA1GduPaaEv6nKWVgQwH7gPOA84vK69DHwj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KyuAz5SdCciN5/w2ltOeC26b2fufkAIH2X3VmAlU4P8RuBjyfI1wPWz\nPUg7gnQr4ZOk0cXAHYSjNHYS3kxnt+H5e52HKs6NB7K1h6/L1nwTaDxyahUwmiyPAqtne5BOjoh/\nklAWqPEAotZcDWwBbqWgr1yR80C2/FWB+4CHgCsK7ksvGCaUW0iuh2e7Q6unsd0ILGnSfi1wT4bH\n8aCig033t/0D4Cbgj5L1Pwb+DLi8Q/3qFb7m8vcWYBdwLOH1u5Uw0tTcVUnxmm01yC9o4T4/BOp/\n0uW4pE1Tpf3b3kK2D00Fja/DZUz9pqjsdiXXzwB3EcpXBnnrxgmDuTFgKfD0bHdod2mlvm62Hngf\n4eChE4GTcQ93Vkvrlt/N1B0kSuchwmtvOeG1+F7Ca1OtORJYmCwvIMxG83U5N+uBNcnyGuDuIjrx\nbkIN8iXCJ8rX6m67lrCjaSvwS53vWvS+QJjmtYXwnztr7UxNeSBbfk4kzPx5GHgM/55Z3QH8D7CX\nkJuXEWYA3UfB0w8lSZIkSZIkSZIkSZIkSZIkSZIktcn/A4eK9UXawRDUAAAAAElFTkSuQmCC\n" } ], "prompt_number": 6 }, { "cell_type": "markdown", "metadata": {}, "source": [ "
display
and display_png
. The former computes all representations of the object, and lets the notebook UI decide which to display. The later only computes the PNG representation.\n",
"