服务热线
178 0020 3020
install.packages('ggthemes')
library(ggplot2)
library(reshape2)
library(ggthemes)
b<-read.csv('e:/R学习小组/3/R2-3.1.csv')
mydata<-melt(b,id.vars='Products',variable.name='Quater',value.name='Index')
ggplot(mydata,aes(Quater,Index,fill=Products))+geom_bar(stat='identity',position='dodge')+theme_economist() + scale_fill_wsj('rgby')+xlab('Time')+ggtitle('R2-24')
a<-read.csv('e:/R学习小组/3/R2_3_2.csv')
ggplot(a,aes(社区,fill=态度))+geom_bar(position='stack')+coord_flip()+ylab("频数")+ggtitle('R2-24')
附件