optiwindnet.svg =============== .. py:module:: optiwindnet.svg Module Contents --------------- .. py:class:: SvgRepr(data: str) Helper class to get IPython to display the SVG figure encoded in data. .. py:attribute:: data .. py:method:: save(filepath: str) -> None write SVG to file `filepath` .. py:function:: svgplot(G: networkx.Graph, *, landscape: bool = True, infobox: bool = True, dark: bool | None = None, transparent: bool = True, node_size: int = 12, github_bugfix: bool = True) -> SvgRepr Draw a NetworkX graph representation as SVG markup. If using interactively (e.g. Jupyter notebook), the returned object must either be the cell's output or be passed to IPython's display() function. Alternative to own.plotting.gplot() because matplotlib's svg backend does not make efficient use of SVG primitives. :param G: graph to plot :param landscape: rotate(?) the plot by G's graph attribute 'landscape_angle'. :param infobox: add(?) text box with summary of G's main properties: capacity, number of turbines, excess feeders, total feeders, total cable length. :param dark: color theme to use: True -> dark; False: light; None -> guess :param transparent: background color: True -> transparent; False -> theme-based :returns: SvgRepr object containing the SVG markup in its 'data' attribute