In [1]:
from IPython.display import SVG
from IPython.display import HTML
In [2]:
svg = '''<svg height="50" width="200">
<rect fill="green" x="0" y="0" width="200" height="50"></rect>
<text x="100" y="25" fill="red" text-anchor="middle" alignment-baseline="central">Foo</text>
</svg>'''
HTML(svg)
Out[2]:
In [ ]: