服务热线
178 0020 3020
任务一
library(ggplot2)
library(ggthemes)
library(reshape2)
mydata<-read.csv("R2_3_1.csv")
mydata<melt(mydata,id.vars='Products',measure.vars=c("Q1th","Q2nd","Q3rd","Q4th"))
ggplot(mydata,aes(x=variable,y=value,fill=Products))+geom_bar(stat="identity",position="dodge",color="black")+labs(x="Time",y="Index")+ggtitle("R2-18")+scale_fill_wsj("rgby")+theme_wsj(base_size=6,color="blue")
任务二
library(ggplot2)
library(ggthemes)
library(reshape2)
mydata<-read.csv("R2_3_2.csv")
ggplot(mydata,aes(社区,fill=态度))+geom_bar(position="stack")+ggtitle("R2-18")+labs(x="社区",y="count")+coord_flip()
附件