Skip to content

tree plot

2 messages · Luis Silva, Ko-Kang Kevin Wang

#
Hello helpers

I have this problem. When I plot a regression tree, some words 
are cutted in the figure. There is an attached file tree.ps to 
see what I'm saying. In the right figure some labels are 
cutted. How can I solve this problem?
--


http://adsl.sapo.pt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tree.ps
Type: application/postscript
Size: 4743 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20030408/364d89b8/tree.ps
#
Are you using the tree or the rpart package?  It is better to use rpart 
(and I'm assuming that you did).

You can set the font size when you put the text.  For example suppose you 
have fitted an rpart() regression tree called "iris.rpart", then you can 
do:
  plot(iris.rpart)
  text(iris.rpart, cex = 0.7)
this should show the text properly as the text will be scaled to 70% of 
the original size.
On Tue, 8 Apr 2003, Luis Silva wrote: