#==================== # Figure 9.5.R. # Plots of sine and cosine functions. #==================== th.lo=-4*pi th.hi=4*pi theta=th.lo+(th.hi-th.lo)*(0:1000)/1000 # Values of theta ranging # from -4*pi to +4*pi. y1=sin(theta) y2=cos(theta) plot(theta,y1,type="l",lty=1,ylim=c(-2,2),xlab="theta",ylab="sine and cosine") points(theta,y2,type="l",lty=2)