{ } Raw JSON

bundles / IPython 9.17.0 / IPython / core / formatters / SVGFormatter

MetaHasTraits

IPython.core.formatters:SVGFormatter

source: /dev/ipython/IPython/core/formatters.py:805

Signature

def SVGFormatter(**kwargs: t.Any) → None

Summary

An SVG formatter.

Extended Summary

To define the callables that compute the SVG representation of your objects, define a _repr_svg_ method or use the for_type or for_type_by_name methods to register functions that handle this.

The return value of this formatter should be valid SVG enclosed in `<svg>` tags, that could be injected into an existing DOM. It should not include the `<html> or `<body> tags.

Aliases

  • IPython.core.formatters.SVGFormatter