I am using scikit's regression tree function and graphviz to generate the wonderful, easy to interpret visuals of some decision trees:
dot_data = tree.export_graphviz(Run.reg, out_file=None,
feature_names=Xvar,
filled=True, rounded=True,
special_characters=True)
graph = pydotplus.graph_from_dot_data(dot_data)
graph.write_png('CART.png')
graph.write_svg("CART.svg")
This runs perfectly, but I'd like to change the color scheme if possible? The plot represents CO2 fluxes, so I'd like to make the negative values green and positive brown. I can export as svg instead and alter everything manually, but when I do, the text doesn't quite line up with the boxes so changing the colors manually and fixing all the text adds a very tedious step to my workflow that I would really like to avoid!
Also, I've seen some trees where the length of the lines connecting nodes is proportional to the % variance explained by the split. I'd love to be able to do that too if possible?