We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 15cfe9c + 9a9e2f3 commit a6e9111Copy full SHA for a6e9111
1 file changed
streamz/graph.py
@@ -131,7 +131,14 @@ def readable_graph(graph):
131
def to_graphviz(graph, **graph_attr):
132
import graphviz
133
134
- gvz = graphviz.Digraph(graph_attr=graph_attr)
+ digraph_kwargs = {'name', 'comment', 'filename',
135
+ 'format', 'engine', 'encoding',
136
+ 'graph_attr', 'node_attr', 'edge_attr',
137
+ 'body', 'strict', 'directory'}
138
+ if not digraph_kwargs.intersection(graph_attr):
139
+ graph_attr = dict(graph_attr=graph_attr)
140
+
141
+ gvz = graphviz.Digraph(**graph_attr)
142
for node, attrs in graph.nodes.items():
143
gvz.node(node, **attrs)
144
for edge, attrs in graph.edges().items():
0 commit comments