服务热线
178 0020 3020
library(ggplot2)
library(reshape2)
install.packages("ggthemes")
library(ggthemes)
data<- read.csv(file.choose())
data
mydata <- melt(data,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")+theme_economist()+labs(x="Time",y="Index")+scale_fill_wsj("rgby")+ggtitle("R2-39")
第二张图(系统无法识别中文)
data2 <- read.csv(file.choose())
ggplot(data2,aes(x=group,fill=AT))+geom_bar(position="stack")+coord_flip()+ggtitle("R2-39")
附件