After exporting a .dot file using scikit-learn, a convenient function export_graphviz.
I am trying to display a points file using Graphviz in the cell of my Jupyter laptop:
import graphviz
from IPython.display import display
with open("tree_1.dot") as f:
dot_graph = f.read()
display(graphviz.Source(dot_graph))
However, out [] is just an empty cell.
I use graphviz 0.5(pip, then conda is installed), iPython 5.1and Python 3.5. The file point looks correct, here are the first characters:
digraph Tree {\nnode [shape=box, style="filled", color=
iPython display seems to work for other objects, including Matplotlib graphics and Pandas data frames.
It is worth noting that the example on the Graphviz website also does not work.
source
share