title: Make a graph in pydot from decision tree in sklearn Python
body: <p>I expected this code to create a PDF graph of the tree.</p>
  
  <pre><code>from sklearn import datasets,tree
  import StringIO
  import pydot
  from sklearn.externals.six import StringIO  
  
  iris = datasets.load_iris()
  
  clf = tree.DecisionTreeClassifier()
  clf = clf.fit(iris['data'],iris['target'])
  
  dot_data = StringIO.StringIO()
  tree.export_graphviz(clf, out_file=dot_data)
  graph = pydot.graph_from_dot_data(dot_data.getvalue())
  graph.write_pdf("iris.pdf")
  </code></pre>
  
  <p>Is there a way to do what I want though pydot? This way is a dead end.</p>
  
  <p>Explaining the problem further, the code fails in the last statement. graph.write_pdf() is looking for Graphviz in graph.progs() but there are no entries there. The error message says Graphviz executable not found.</p>
  
  <p>Anyhow I was able to pdf file by invoking the dot.exe command in a DOS terminal, but it would be better to use pydot to do this step.</p>