5
Can anyone tell me if it is possible to make this chart with the bars side by side without using data frames or "melt"?
v1=c(100,120,140)
v2=c(125, 102,104)
a=data.frame(year=factor(2003:2005))
ggplot(data=a, aes(x=year)) +
geom_bar(aes(y = v1, fill = "b"), stat="identity", width=0.3) +
geom_bar(aes(y = v2, fill = "c"), stat="identity", width=0.2) +
scale_fill_manual(labels = c("C","13"), values=c("c" = "red","b"="blue")) +
theme(legend.key=element_rect(fill = "grey"),
legend.title=element_blank()) +
labs(x = NULL, y = "Value")