服务热线
178 0020 3020
#我mac显示字体的问题还木有解决
#R2-3-1
library(ggplot2)
library(reshape2)
library(ggthemes)
mydata <-read.csv(file.choose(),head=T)
head(mydata)
mydata2=melt(mydata,id.vars="Products",variable.name = "Time",value.name="Index")
ggplot()+scale_fill_wsj("rgby") +
geom_bar(data=mydata2,aes(x=Time,y=Index,fill=Products),
stat="identity",position="dodge") +
theme_economist()+ggtitle("R2-05")R2-3-2
mydata3=read.table(file.choose(),head=T,sep=",")
head(mydata3)
ggplot()+geom_bar(data=mydata3,aes(x=社区,fill=态度)) +
coord_flip() +
theme(text=element_text(size=12)) +
ggtitle("R2-05")
附件