Skip to content

Commit

Permalink
Showing attribute labels for n-ary edges in dot export
Browse files Browse the repository at this point in the history
Fixed #127, closed #125
  • Loading branch information
trungdong committed Nov 20, 2018
1 parent 495681f commit 174a19e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/prov/dot.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,10 @@ def _get_node(qname, prov_type=None):
dot.add_edge(pydot.Edge(bnode, _get_node(nodes[1], inferred_types[1]), **style))
if add_nary_elements:
style['color'] = 'gray' # all remaining segment to be gray
for node, inferred_type in zip(nodes[2:], inferred_types[2:]):
style['fontcolor'] = 'dimgray' # text in darker gray
for attr_name, node, inferred_type in zip(attr_names[2:], nodes[2:], inferred_types[2:]):
if node is not None:
style['label'] = attr_name.localpart
dot.add_edge(
pydot.Edge(bnode, _get_node(node, inferred_type), **style)
)
Expand Down

0 comments on commit 174a19e

Please sign in to comment.