bar chart - Grouped Stacked Bar Plot in R from Table Columns -


i want generate plot looking this:

enter image description here

could give me hint how top achieve that? startet with:

  t1 <- c(23.2,34.5,76.3,65.8,12.6)   t2 <- c(15.6,12.4,21.8,20,5.2)   t3 <- c(15.6,12.4,21.8,20,5.2)   <- gl(5,1,5,labels=c("mähen","wenden","schwaden","pressen","abtransport"))    data <- cbind(t1,t2,t3)   rownames(data) <- levels(a)   barplot(x1,names.arg=levels(a))   barplot(x3,names.arg=levels(a))   #barplot(t(data),beside=f, ylim=c(0,100),legend.text=colnames(data),   barplot(t(data),beside=f, legend.text=colnames(data),   col=c("grey50","grey80"),ylab="arbeitszeitbedarf [h/ha]") 

this requested... except missing values not provide.

 png('rplot2.png'); par(mar=c(5,4,4,5)  ) data <- cbind('t1 - grundzeit'=t1,'t2 - hilfszeit'=t2)    rownames(data) <- levels(a)    barplot(t(data),beside=f, legend.text=colnames(data),    col=c("grey50","grey80"),ylab="arbeitszeitbedarf [h/ha]",     args.legend=list(inset=4,x=7,y=70)) dev.off() 

enter image description here


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -