Open Kecksdose opened 8 years ago
Hi Timon,
I recently updated my system. Currently I'm having all sorts of problems with pygraphviz, pydot, networks. I just spent a couple of hours on it. I'll try again later.
you might try replacing G = nx.DiGraph(nx.read_dot('expressionTree.dot'))
with G =nx.drawing.nx_agraph.read_dot('expressionTree.dot')
(seems the networkx api has changed a bit)
Also, maybe issue is with the dot file created by RooFit. Check to see if you can run dot
directly on the expressionTree.dot
file. Or comment the line pdf.graphVizTree('expressionTree.dot')
and use the one in the repository.
Hi Kyle,
I found a solution without using nx.draw_graphviz
(which is some kind of broken, I think). Here is the code:
import networkx as nx
import pydot
from IPython.display import Image
model.graphVizTree('SimpleModel.dot')
G = nx.drawing.nx_agraph.read_dot('SimpleModel.dot')
model_dot = nx.to_pydot(G)
model_png = model_dot.create_png(prog='dot')
Image(model_png)
Anyway, thanks for your quick response! Timon
Hi,
while copy/pasting your RooFit Notebook, I got some Errors on the
nx.draw_graphvix()
method. It saysCould me tell me which specific versions of Pydot, Networkx and Graphviz you are using? Mine are
Regards, Timon