mufasa.graph_svg.draw#
Draws a graph description as SVG. Styles (graph.css), hover script (graph.js) and icons (icons/) are files next to this module.
Attributes#
Classes#
A rendered Fusion Graph. Displays itself in Jupyter notebooks; |
Functions#
|
|
|
A 2-3 letter code for a class name: |
|
Draw a graph description as an SVG string. |
Module Contents#
- mufasa.graph_svg.draw.R = 34#
- mufasa.graph_svg.draw.PORT_R = 13#
- mufasa.graph_svg.draw.ASSETS#
- mufasa.graph_svg.draw.asset(name: str) str#
- Parameters:
name (str)
- Return type:
str
- mufasa.graph_svg.draw.short_code(name: str) str#
A 2-3 letter code for a class name:
BayesianFusion->BF,POM->POM,Threshold->TH.- Parameters:
name (str)
- Return type:
str
- mufasa.graph_svg.draw.render(spec: mufasa.graph_svg.spec.GraphSpec, prefix: str | None = None, embed_assets: bool = True) str#
Draw a graph description as an SVG string.
prefixmakes ids unique when several graphs share a page. Withembed_assetsthe SVG carries its own styles and hover script (e.g. for notebooks); without, the page must load graph.css and graph.js.- Parameters:
prefix (str | None)
embed_assets (bool)
- Return type:
str