plot.rpart(tree, uniform=F, branch=1, compress=F, nspace, margin=0,
minbranch=.3, ...)rpart, containing a classification, regression,
or rate tree.TRUE, uniform vertical spacing of the nodes is used; this may be
less cluttered when fitting a large plot onto a page.
The default is to use a non-uniform spacing proportional to the
error in the fit.FALSE, the leaf nodes will be at the horzontal plot coordinates of
1:nleaves (like plot.tree).
If TRUE, the routine attempts a more compact arrangement of
the tree.
The compaction algorithm assumes branch.minbranch times the average
branch length. This parameter is ignored if uniform=T.
Sometimes a split will give very little improvement, or even (in
the classification case) no improvement ax and y.plot, for objects
of class rpart.
The y-coordinate of the top node of the tree will always be 1.rpart, text.rpartdata(cu.summary)
fit <- rpart(Price ~ Mileage + Type + Country, cu.summary)
plot(fit, compress=T)
text(fit, use.n=T)Run the code above in your browser using DataLab