服务热线
178 0020 3020
作业1:柱状图
x<-c(1,2,3,4,5,6)
y<-c(7,12,5,20,16,10)
barplot(y,xlab='月份',ylab='营业额',main='某销售公司上半年的营业额',col='blue',border='red',names.arg=x)
作业二:
M <- c("一月", "二月", "三月", "四月", "五月", "六月")
一部 <- c(2,4,1,6,5,2)
二部<- c(2,5,2,7,6,2)
三部<- c(3,3,1,7,5,6)
barplot(rbind(一部,二部,三部),names.arg = M, xlab = "月份",ylab = "收入",main = "某销售公司上半年的营业额以及总营业额",
col = c("yellow","green", "red"))
legend("topleft",c("一部","二部","三部"),fill = c("yellow","green", "red"))
附件