I am Using R to create a d开发者_运维问答ecision tree but need a web base control that will allow be to plot the tree. I have all of the node info but need to plot. Is there any open source tool that will allow me to do this? I prefer python or a javascript control.
Thanks
Plot your decision tree to a PNG or JPG, save it to a file, serve it via your Webserver.
If I remember correctly the code would be something like this:
jpeg('rplot.jpg')
plot(x,y)
dev.off()
While I was searching for ways to plot graphs with JS, I came across D3. I haven't used it yet, but it looked promising.
I am using JavaScript InfoVis toolkit that offers support for variety of tree visualizations and beyond. Of course, it means that you'll need a browser to run this but it works pretty well.
As for Python, use it to map your tree structure to InfoVis json format for trees.
精彩评论