生成随机数据Runif()
runif(30,180,240) # 生成180-240之间的30个数据
round(runif(30,180,240)) # 不要小数点
sample(1:10,6,replace=T)
sample(1:10,6,replace=False)
data <-runif(10,40,90)
plot(data,type="p",main="绘点图",xlab="x轴",ylab="y轴",col=c("red","blue","pink"))
plot(data,type="p",main="绘点图",xlab="x轴",ylab="y轴",col=c("red","blue","pink"))
plot(data1,type="l",main="绘点线",xlab="x轴",ylab="y轴",col=c("red","blue","pink"))
plot(data,type="b",main="同时绘制点和线",xlab="x轴",ylab="y轴",col=c("red","blue","pink"))
plot(data,type="c",main="仅绘制参数b所示的线",xlab="x轴",ylab="y轴",col=c("red","blue","pink"))
plot(data,type="o",main="同时绘制点和线,且线穿过点",xlab="x轴",ylab="y轴",col=c("red","blue","pink"))
plot(data,type="h",main="绘制出点到横坐标轴的垂直线",xlab="x轴",ylab="y轴",col=c("red","blue","pink"))
plot(data,type="s",main="绘制出阶梯图(先横后纵)",xlab="x轴",ylab="y轴",col=c("red","blue","pink"))
plot(data,type="S",main="绘制出阶梯图(先纵后竖)",xlab="x轴",ylab="y轴",col=c("red","blue","pink"))
plot(data,type="n",main="空图",xlab="x轴",ylab="y轴")