output_graph
def output_graph(graph: nx.DiGraph,
                 file_name: Union[Path, str],
                 sort: bool = True,
                 file_format=None,
                 dpi: Optional[int] = 800) -> NoneOutput a graph to a file, either as image or as dot file.
Arguments:
- graphnx.DiGraph - the DiGraph to write or plot
- file_nameUnion[Path, str] - the file name to write to.
- sortbool, optional - create a copy of the graph with sorted keys (Default value = True)
- file_format- graphviz output format, if None, the file_name extension is used as format https://graphviz.org/doc/info/output.html (opens in a new tab) (Default value = None)
- dpiOptional[int], optional - (Default value = 800)
Returns:
Raises:
ValueError when the file_name does not end on .svg, .png or .dot
plot_graph
def plot_graph(graph: nx.DiGraph,
               dpi: int = 800,
               figsize: Optional[Tuple[int, int]] = None)Arguments:
- graphnx.DiGraph - the DiGraph to write or plot
- dpiint, optional - dpi of the matplotlib figure. (Default value = 800)
- figsizeOptional[Tuple[int, int]], optional - (Default value = None)
Returns:
: Displays the image