cottax.consumers.visualization.interactive module¶
A graph, or a Plan, as one interactive page: its XDSM and / or its N2 as views.
- VIEWS = {'n2': 'N2', 'xdsm': 'XDSM'}¶
The pictures a page can carry, by the name views takes and the name a button shows.
- render_html(graph: NestingGraph | ExecutableGraph | Plan, *, views: Sequence[str] = ('xdsm', 'n2'), names: bool = True, colour: bool = True, blocks: bool | ExecutableGraph = False, style: Style | str = TERRACOTTA, formatter: Formatter = PlainFormat(), xdsm: Mapping[str, Any] | None = None, n2: Mapping[str, Any] | None = None, write: bool = False, file_name: str = 'graph', outdir: str = '.')[source]¶
graph as an interactive page: drag to pan, Ctrl+scroll to zoom, Fit; hover a step or a coupling to name it and light its row and column. A Plan is a frame per prefix under a slider, labelled by its op, what the op changed haloed.
views: the pictures each frame carries, ‘xdsm’ and / or ‘n2’, the first opened. names, colour: the Names and (with an N2) Colour toggles’ starting state. blocks: ring the XDSM’s solves (an ExecutableGraph: as that proof has them). xdsm: render_xdsm_svg’s own arguments for the XDSM view. n2: the N2 view’s (cell, font_size, order, groups – by_namespace() unless said –, grouped, colours). write=True also writes <outdir>/<file_name>.html, filling the window.
- Return type: