To define the callables that compute the representation of your objects, define a _ipython_display_
method or use the for_type
or for_type_by_name
methods to register functions that handle this. Unlike mime-type displays, this method should not return anything, instead calling any appropriate display methods itself.
This display formatter has highest priority. If it fires, no other display formatter will be called.
Prior to IPython 6.1, _ipython_display_
was the only way to display custom mime-types without registering a new Formatter.
IPython 6.1 introduces :None:None:`_repr_mimebundle_`
for displaying custom mime-types, so _ipython_display_
should only be used for objects that require unusual display patterns, such as multiple display calls.
An escape-hatch Formatter for objects that know how to display themselves.
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them