I\'m a noob in using sciki-learn so please bear with me.
I was going through the example: http://scikit-learn.org/stable/modules/tree.html#tree
>&
You were very close! Just do:
graph_from_dot_data(out.getvalue()).write_pdf("somefile.pdf")