Displaying 1 result from an estimated 1 matches for "ntreat2".
Did you mean:
treat2
2010 Jan 20
3
barchart with stacked and beside bars
...g....
I have one barchart like this:
bio<-matrix(c(10,23,9,25),nrow=2,byrow=T)
ntreat<-c("n0","n96")
colnames(bio)<-ntreat
barplot(bio,beside=T)
now i want a similar barchart but with stacked bars:
ld<-matrix(c(25,25,50,10,30,60,15,35,50,30,30,40),nrow=4,byrow=T)
ntreat2<-c("n0","n96","n0","n96")
rownames(ld)<-ntreat2
typ<-c("gr","fo","le")
colnames(ld)<-typ
barplot(t(ld))
I can't work out how to put the same treatments side by side and keep "typ"
stacked.
Thanks,
Chr...