[R] tree plot
Luis Silva
lm.silva at sapo.pt
Tue Apr 8 13:29:41 CEST 2003
The left plot is from tree pack and the rigth is from rpart. It
solved partially my problem. It still cuts "setosa" and the
text is getting too small...
See attached file
> plot(ir.tr); text(ir.tr,cex=0.7)
> plot(ir.rpart); text(ir.rpart,use.n=TRUE,cex=0.6)
What are the differences between both packages?
} 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)
}
}
}
--
http://adsl.sapo.pt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tree.ps
Type: application/postscript
Size: 4758 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20030408/df219f33/tree.ps
More information about the R-help
mailing list