R2-39 第三次作业提交

redpanda 2017-11-22 00:14:19 阅读: 1069

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")


 

 

 

 
邀请讨论

附件

{{f.title}} 大小 {{f.file_size}} 下载 {{f.count_download}} 金币 {{f.count_gold}}
{{item.nick_name}} 受邀请回答 {{item.create_time}}
{{item.refer_comment.nick_name}} {{item.refer_comment.create_time}}

附件

{{f.title}} 大小 {{f.file_size}} 下载 {{f.count_download}} 金币 {{f.count_gold}}
切换到完整回复 发送回复
赞({{item.count_zan}}) 踩({{item.count_cai}}) 删除 回复 关闭
科研狗©2015-2025 科研好助手,京ICP备20005780号-1 建议意见

服务热线

178 0020 3020

微信服务号