服务热线
178 0020 3020
library(ggplot2)
library(ggthemes)
library(reshape2)
data1<-read.table("R2-3.1.csv",header = T,sep = ",")
data1.1<-melt(data1,id.vars = "Products",measure.vars = c("Q1th","Q2nd","Q3rd","Q4th"),variable.name = "time")
ggplot(data1.2,aes(x=time,y=value,fill=Products))+geom_bar(position = "dodge",stat = "identity")+ggtitle("R2-12")+xlab("Time")+ylab("Index")+theme_economist()+scale_fill_wsj("rgby")
data2<-read.table("R2_3_2.csv",header = T,sep = ",")
ggplot(data2,aes(x=社区,fill=态度))+geom_bar(position = "stack")+coord_flip()+ggtitle("R2-12")
附件