[R] Text Labels on plots in R

ggrothendieck@yifan.net ggrothendieck at yifan.net
Wed Apr 3 21:31:26 CEST 2002


On 3 Apr 2002 at 11:32, ggrothendieck at yifan.net wrote:

> 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 )

Just noticed one improvement here:

stripchart( as.list(y), vertical = TRUE )

works and also preserves the order of the x axis elements.  

One suggestion. If dotchart were to also support the vertical keyword 
then one could have an even simpler solution: dotchart(y,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