[R] tree plot
Luis Silva
lm.silva at sapo.pt
Tue Apr 8 15:40:57 CEST 2003
xpd solved my problem. thanks! I did not tried post. my purpose
is not to create a postscript file. thanks anyway
luis
} ?par, look at xpd.
}
} I haven't looked at your figures, but if you are
} plotting in less that the
} full device region you probably ought to both
} decrease the font size and
} remove clipping to the plot region. You probably
} want par(xpd=TRUE), and
} you may want to adjust the figure margins too.
}
} On Tue, 8 Apr 2003, Luis Silva wrote:
}
} > 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
} >
} >
}
} --
} Brian D. Ripley,
} ripley at stats.ox.ac.uk
} Professor of Applied Statistics,
} http://www.stats.ox.ac.uk/~ripley/
} University of Oxford, Tel: +44 1865
} 272861 (self)
} 1 South Parks Road, +44 1865
} 272866 (PA)
} Oxford OX1 3TG, UK Fax: +44 1865
} 272595
}
}
--
http://adsl.sapo.pt
More information about the R-help
mailing list