[R] Text Labels on plots in R

ggrothendieck@yifan.net ggrothendieck at yifan.net
Wed Apr 3 18:32:03 CEST 2002


On 3 Apr 2002 at 18:12, Christophe Declercq wrote:

> >
> > Suppose
> >
> > y <- c(5:2,4)
> > names(y) <- c("Dave", "Tim", "Ian", "Steve", "Paul")
> 
> 
> stripchart(y~names(y), vertical=TRUE)

Note that this rearranges the order of the elements on the x axis.
If maintaining this order is important then use:

ynames <- factor(  names(y), levels = names(y)  )
stripchart( y ~ ynames, vertical=TRUE )
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list