第三期任务作业 R-011-王涛

blanking 2017-07-13 19:10:42 阅读: 1024

#R小组第三期作业1

M <- c("Jan", "Feb", "Mar", "Apr", "May", "Jun")

Revenue <- c(7, 12, 5, 20, 16, 10)

png(file= "R-03-01.png")

barplot(Revenue, 

        xlab = "Month", 

        ylab = "Revenue",

        main = "Revenue chart",

        col = "blue",

        names.arg = M,

        border = "red")

dev.off()

#R小组第三期作业2

M <- c("Jan", "Feb", "Mar", "Apr", "May", "Jun")

part1 <- c(2,4,1,6,5,2)

part2 <- c(2,5,2,7,6,2)

part3 <- c(3,3,1,7,5,6)

png(file= "R-03-02.png")

barplot(rbind(part1,part2,part3),

        names.arg = M, 

        xlab = "Month",

        ylab = "Revenue",

        main = "Revenue chart",

        col = c("yellow","orange", "red")

        )

legend("topleft",c("part1","part2","part3"),fill = c("yellow","orange", "red"))

dev.off()


 
邀请讨论

附件

{{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-2024 科研好助手,京ICP备20005780号-1 建议意见

服务热线

178 0020 3020

微信服务号