[R] tree plot

Ko-Kang Kevin Wang kwan022 at stat.auckland.ac.nz
Tue Apr 8 14:17:13 CEST 2003


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:

> Date: Tue, 08 Apr 2003 12:04:38 +0100 (WEST)
> From: Luis Silva <lm.silva at sapo.pt>
> To: R help <r-help at stat.math.ethz.ch>
> Subject: [R] tree plot
> 
> 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
> 
> 

-- 
Cheers,

Kevin

------------------------------------------------------------------------------
/* Time is the greatest teacher, unfortunately it kills its students */

--
Ko-Kang Kevin Wang
Master of Science (MSc) Student
SLC Tutor and Lab Demonstrator
Department of Statistics
University of Auckland
New Zealand
Homepage: http://www.stat.auckland.ac.nz/~kwan022
Ph: 373-7599
    x88475 (City)
    x88480 (Tamaki)



More information about the R-help mailing list