Jupyter Notebook test

Custom Display Logic


As described in the Rich Output tutorial, the IPython display system can display rich representations of objects in the following formats:

  • JavaScript
  • HTML
  • PNG
  • JPEG
  • SVG
  • LaTeX
  • PDF

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:

  1. Implementing special display methods such as _repr_html_ when you define your class.
  2. Registering a display function for a particular existing class.

This Notebook describes and illustrates both approaches.

Read more…