Home > Software engineering >  Is it possible to "Mirror" the look of a decision tree generated with rpart.plot in R?
Is it possible to "Mirror" the look of a decision tree generated with rpart.plot in R?

Time:12-17

I have generated a simple decision with rpart and displayed it with rpart.plot like the following.

Decision Tree

Is it possible to edit the look of the tree so it's "mirrored" like the following:

         (e-100%)
____(yes)___|___(no)____
|                       |
|                     (e-53%)
(p-47%)               __|__
                     |     |
                  (p-1%)  (e-52%)

CodePudding user response:

Adding the parameter xflip=TRUE to rpart.plot function flips the tree horizontally like intended

  • Related