[R] reversing the x-axis terms on a boxplot

Dylan Beaudette dylan.beaudette at gmail.com
Wed Jul 25 20:18:05 CEST 2007


I am able to reverse the order of plotting on regular plots (i.e. with the 
plot() function) by manually setting the xlim variable. 

Is there some trick like this which will work for a boxplot?

* for example:

l <- sample(letters, 500, replace=TRUE)
n <- runif(500)
boxplot(n ~ l)

this will produce a plot with the x-axis ranging from a->z ... i know that 
these are labels, associated with an integer index-- but is there someway to 
reverse the plotting order?

Thanks in advance,


More information about the R-help mailing list