#CHAPTER 1
#Recipe 1. 散点图
plot(cars$dist~cars$speed)
plot(cars$dist~cars$speed, # y~x
main="Relationship between car distance & speed", #Plot Title
xlab="Speed (miles per hour)", #X axis title
ylab="Distance travelled (miles)", #Y axis title
xlim=c(0,30), #Set x axis limits from 0 to 30 ylim=c(0,140), #Set y axis limits
from 0 to 30140 xaxs="i", #Set x axis style as internal
yaxs="i", #Set y axis style as internal
col="red", #Set the colour of plotting
symbol to red pch=19) ......
阅读全文