服务热线
178 0020 3020
install.packages('reshape')
install.packages('ggplot2')
install.packages('ggthemes')
library("reshape2")
library("ggplot2")
library("ggthemes")
data<-read.csv("R2-3.1.csv",header=T)
data1<-melt(data,id.vars='Products',measure.vars=c("Q1th","Q2nd","Q3rd","Q4th"))
ggplot(data1,aes(x=variable,y=value,fill=Products))+geom_bar(stat="identity",position="dodge",color="black")+labs(x="Time",y="Index")+ggtitle("R2-35")+scale_fill_wsj("rgby")+theme_wsj(base_size=10,color="blue")
data<-read.csv("R2_3_2.csv",header=T)
ggplot(data,aes(社区,fill=态度))+geom_bar(position="stack")+ggtitle("R2-35")+labs(x="社区",y="count")+coord_flip()
附件