x<-seq(-2*pi,2*pi,0.05)
y<-cos(x)
dat<-data.frame(x=x,y=y)
plot(dat$x,dat$y,type="l")
plot(dat$x,dat$y,type="l",lty=4,col="darkgray")
plot(dat$x,dat$y,type="l",lty="52",col="darkgray")
x<-seq(-10,10,0.1)
y<-sin(x)
z<-cos(x)
matplot(x,cbind(y,z),col=c("red","blue"),las=1,xlab="x",ylab="Sine(x) or Cosine(x)",lty=1:2,type="l")
ll.dat<-Loblolly
ll.dat$height<-ll.dat$height*0.3048
summary(ll.dat)
plot(height~age,type="n",xlab="Age (yr)",ylab="Height (m)",las=1,xlim=c(0,25),data=ll.dat)
points(ll.dat$age[ll.dat$Seed==307],ll.dat$height[ll.dat$Seed==329],pch=1,col="red",type="o")
points(ll.dat$age[ll.dat$Seed==311],ll.dat$height[ll.dat$Seed==307],pch=6,col="blue",type="o")
points(ll.dat$age[ll.dat$Seed==311],ll.dat$height[ll.dat$Seed==311],pch=22,col="black",type="o")
legend("topleft",legend=c(311,307,329),pch=c(1,6,22),col=c("red","blue","black"))