Re: [R] change order of bar plot categories

2009-10-15 Thread Wade Wall
Hi Tobias and Felipe, Both of your methods changed to the labels (L,M,H), but not the corresponding values. The methods graph L as H, M as L, and M and H. I have had display problems using ggplot2 before, but it seemed as if it was because I was using Windows XP. I ran the current code using Ub

Re: [R] change order of bar plot categories

2009-10-14 Thread Felipe Carrillo
Is this what you want? temp<-c(rep("Low",2),rep("Medium",2),rep("High",2)) light<-rep(c("Dark","light"),3) avg<-dat.avg2[,3] # se<-dat.avg2[,4] dat.avg.temp<-data.frame(cbind(avg,se)) dat.avg.temp<-data.frame(cbind(temp,light,dat.avg.temp)) dat.plot<-qplot(light,avg, fill=factor(temp),data=dat.avg