def fromfile(fname):
fig = SVGFigure()<EOL>with open(fname) as fid:<EOL><INDENT>svg_file = etree.parse(fid)<EOL><DEDENT>fig.root = svg_file.getroot()<EOL>return fig<EOL>
Open SVG figure from file.

    Parameters
    ----------
    fname : str
        name of the SVG file

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