finesse.graph.operator_graph.OperatorGraph.plot

OperatorGraph.plot(self, graphviz_prog='neato', pos=None, node_labels=None, edge_labels=False, ignore_nodes=None, alpha_nodes=None, alpha='44', dpi=200, svg=False)

Plot the operator graph using Graphviz.

Parameters
graphviz_progstr, optional

The Graphviz program to use for layout. Default is ‘neato’, see PyGraphviz for mode layouts.

posdict, optional

A dictionary mapping node names to positions. Default is None.

node_labelsdict, optional

Replace node indices with text labels, default is off.

edge_labelsbool, optional

Label edges with operator expressions, default is False.

ignore_nodeslist, optional

A list of nodes indices to ignore. Default is an empty list.

alpha_nodeslist, optional

A list of node indices to apply alpha transparency to. Default is an empty list.

alphastr, optional

The doubled hexadecial alpha value for transparency. Default is ‘44’, opqaue is ‘FF’, fully transparent is ‘00’

dpiint, optional

Specifies the expected number of pixels per inch on a display device. Default is ‘200’

svgbool, optional

Whether to output the graph as SVG. Default is False.

Returns
dict

A dictionary mapping node names to positions.