fancyRpartPlot: How to avoid overlaying of terminal nodes when you have a significant amount of them?

1.3k Views Asked by At

I am pruning a classification tree using the minimum error and I want to plot the final output. This final output has a considerable amount of terminal nodes and I am trying to find a way to avoid the overlapping between them. So far I have tried using cex and tweak without any luck to modify the font size and see if this affects the layout of the terminal nodes but it seems it doesn't. Anybody knows if there is a way of modifying the terminal nodes layout when using fancyRpartPlo so they are further away and do not overlap?

game.full=prune(game.cart,cp=cp.min)
fancyRpartPlot(game.full, uniform=TRUE,main="Pruned Regression Tree",tweak=3)

enter image description here

1

There are 1 best solutions below

0
Graham Williams On

Rattle's fancyRpartPlot() is simply using the rpart.plot package. There are very many options available to control the text and layout. You may like to review http://www.milbo.org/rpart-plot/prp.pdf.