Skip to content

netlist_carpentry.core.graph.visualization.plotting

Module for graph visualization via plotting (WIP).

Classes:

Plotting

Plotting(
    graph: ModuleGraph,
    format: Optional[Format] = None,
    default_color: str = "lightblue",
    default_size: NonNegativeInt = 300,
)

Bases: VisualizationBase

Methods:

  • build_figure

    Create a matplotlib Figure of the graph with the current formatting rules.

  • export_graphml

    Export the graph in graphml format to display e.g using Gephy.

build_figure

build_figure(figsize: Tuple[float, float] = (10, 8)) -> Figure

Create a matplotlib Figure of the graph with the current formatting rules.

Parameters:

  • figsize

    (Tuple[float, float], default: (10, 8) ) –

    The size of the figure in inches. Defaults to (10, 8).

Returns:

  • Figure ( Figure ) –

    The created figure.

export_graphml

export_graphml(path: Union[str, Path]) -> None

Export the graph in graphml format to display e.g using Gephy.

Parameters:

  • path

    (Union[str, Path]) –

    The path where the graph should be saved.