服务热线
178 0020 3020
1. 颜色命令
col=c('red','green','blue', 'yello','black'
col=rainbow(5)
col=terrain.colors(5)
2. 点线混合图
x<-read.csv('/Users/Administrator/Desktop/data3.csv',header = F)
plot(x,col='red',xlab='YOUNG',ylab='R',type='s',font.axis=2,font.lab=2,cex.lab=2,main="第六期作业",bty="l" )
a=seq(2,50,by=0.5)
b=5*sin(a)+20
lines(a,b,col='green',lwd=2)
c=10:50
d<-13*cos(a)-5*cos(2*a)-2*cos(3*a)-cos(6*a)+20
points(d,pch=1,col="blue")
legend(pch=c(-1,-1,1),lty=c(1,1,-1),"topleft",col=c('red','green','blue'),legend=c("point1","line2","point3"))
附件