data(papa, package="ocedata")
xlim <- c(min(papa$t)-3*28*86400, max(papa$t)) # extra for legend
plot(papa$t, papa$temperature[,1], type='l', xlim=xlim,
xlab="", ylab="Temperature", ylim=range(papa$temperature))
for (i in 2:dim(papa$temperature)[2])
lines(papa$t, papa$temperature[,i], col=i, lwd=2)
legend("topleft", title="z [m]", lwd=2, legend=papa$z, col=1:length(papa$z), bg="white")
plot(papa$t, papa$salinity[,1], type='l', xlim=xlim,
xlab="", ylab="Salinity", ylim=range(papa$salinity), lwd=2)
for (i in 2:dim(papa$salinity)[2])
lines(papa$t, papa$salinity[,i], col=i, lwd=2)
legend("topleft", title="z [m]", lwd=2, legend=papa$z, col=1:length(papa$z), bg="white")
plot(papa$t, papa$sigmaTheta[,1], type='l', xlim=xlim,
xlab="", ylab=expression(sigma[theta]), ylim=range(papa$sigmaTheta), lwd=2)
for (i in 2:dim(papa$sigmaTheta)[2])
lines(papa$t, papa$sigmaTheta[,i], col=i, lwd=2)
legend("topleft", title="z [m]", lwd=2, legend=papa$z, col=1:length(papa$z), bg="white")
Run the code above in your browser using DataLab