服务热线
178 0020 3020
library(ggplot2)
library(ggthemes)
R2_3_1 <- read.csv("/Users/taowang/documents/R/R2/R2-3/R2-3.1.csv",header = T)
library(reshape2)
R2_3_1 <- melt(R2_3_1, id.vars = "Products",variable.name = "Time", value.name = "Index")
png("/Users/taowang/documents/R/R2/R2-3/R2-3-1.png")
ggplot(R2_3_1, aes(Time, Index, fill = Products))+
geom_bar(stat = "identity", position = "dodge")+
ggtitle("R2_04")+
scale_fill_wsj("rgby")+
theme_economist()
dev.off()
R2_3_2 <- read.csv("/Users/taowang/documents/R/R2/R2-3/R2_3_2.csv",header = T)
png("/Users/taowang/documents/R/R2/R2-3/R2-3-2.png")
ggplot(R2_3_2, aes(group,fill= AT))+
geom_bar(position = "stack")+
coord_flip()+
ylab("count")+
ggtitle("R2-04")
dev.off()
附件