to use ggplot:
dat<-data.frame(num=1:3,usage=c(4,2,5),cap=c(10,20,10),diff=c(6,18,5))
dat.melt<-melt(dat,id.var=c('num','cap'))
ggplot(dat.melt)+geom_bar(aes(x=num,y=value,fill=variable),stat='identity')
On Fri, Jan 20, 2012 at 12:30 PM, Jean V Adams wrote:
> Bart6114 wrote on 01/20/2012 08:
Bart6114 wrote on 01/20/2012 08:54:39 AM:
> Hey,
>
> I want to create a stacked barchart in R for the following dataset
> (http://pastebin.com/pyHUNgr2):
>
> # usage capacity diff
> 1 4 10 6
> 2 2 20 18
> 3 5 10 5
>
> The stacked barchart should, in one plot sho
Hey,
I want to create a stacked barchart in R for the following dataset
(http://pastebin.com/pyHUNgr2):
# usage capacitydiff
1 4 10 6
2 2 20 18
3 5 10 5
The stacked barchart should, in one plot show each l
3 matches
Mail list logo