def fromstring(text):
fig = SVGFigure()<EOL>svg = etree.fromstring(text.encode())<EOL>fig.root = svg<EOL>return fig<EOL>
Create a SVG figure from a string.

    Parameters
    ----------
    text : str
        string representing the SVG content. Must be valid SVG.

    Returns
    -------
    SVGFigure
        newly created :py:class:`SVGFigure` initialised with the string
        content.