服务热线
178 0020 3020
x<-read.csv('E:/data1-R6.csv') plot(x,col='red',xlab='keyangou',ylab='R',type='s',font.axis=2,font.lab=2,cex.lab=2,main="I love keyan",bty="l",ylim=c(0,50)) 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(c)-5*cos(2*c)-2*cos(3*c)-cos(6*c)+20 points(c,d,pch=1,col="blue") legend("topleft", legend = c("point1","line2","point3"),col = c("red","green","blue"),pch = c(-1,-1,1),lty = c(1,1,-1))
得到如下图片:
画一个心:
e <- seq(-1,1,length = 100) e1 <- (1-e^2)^(1/2)+(e^2)^(1/3) e2 <- -(1-e^2)^(1/2)+(e^2)^(1/3) plot(c(rev(e),e),c(rev(e2),e1),type="l",col="red")
附件