prov.dot¶
prov.dot renders a ProvBundle/ProvDocument
as a pydot Dot graph, which can then be written out as
PNG, SVG, or PDF via a local Graphviz install. See
Render a document as a graph (PNG/SVG/PDF) for the Graphviz setup notes and end-to-end examples.
- prov.dot.prov_to_dot(bundle: ProvBundle, show_nary: bool = True, use_labels: bool = False, direction: str = 'BT', show_element_attributes: bool = True, show_relation_attributes: bool = True) Dot[source]¶
Convert a provenance bundle/document into a DOT graphical representation.
The bundle is first
unified(); if that raisesProvException(the bundle cannot be unified), the original, non-unified bundle is rendered instead.- Parameters:
bundle – The provenance bundle/document to be converted.
show_nary – Show all elements of n-ary relations (i.e. relations with more than two formal attributes), not just the first two.
use_labels – Use the
prov:labelproperty of an element as its displayed name (instead of its identifier), where available.direction – Direction of the graph, passed to Graphviz as
rankdir. Valid values are"BT"(default),"TB","LR","RL"; any other value is silently replaced with"BT".show_element_attributes – Show attributes of elements as annotation nodes.
show_relation_attributes – Show attributes of relations as annotation nodes.
- Returns:
The
pydot.Dotgraph object.