37 '''Return a GraphViz graph made from the NX graph. The <nodetypes> is 38 a NodeType dictionary and will be used to define the nodes. 40 ag = pgv.AGraph(directed=
True, strict=
False)
41 ag.node_attr[
'shape'] =
'record' 43 for nn
in nxgraph.nodes():
46 typ = typ.split(
':',1)[0]
50 for nt,nh,nd
in nxgraph.edges(data=
True):
51 key =
' {tail_port}-{head_port} '.
format(**nd)
52 dt = nd.get(
'data_type')
55 ag.add_edge(nt,nh, key=key, label=key,
56 tailport=
'o'+
str(nd.get(
'tail_port',0)),
57 headport=
'i'+
str(nd.get(
'head_port',0)))
static bool format(QChar::Decomposition tag, QString &str, int index, int len)
def gvgraph_nodetypes(nxgraph, nodetypes)
def nodetype_label(nt, addtypes=False)