# cumulative deviations for Turin 1961-2003
cdTurin<- CumulativeDeviations(yearly.average.temperature.Turin.Milan[,2])
# cumulative deviations for Milan 1961-2003
cdMilan<- CumulativeDeviations(yearly.average.temperature.Turin.Milan[,3])
plot(1961:2003,cdTurin,type='l',col='cyan',ylim=c(0,15),
main='Cumulative deviations 1961-2003',xlab='Years',ylab='C.D.')
par(new=TRUE)
plot(1961:2003,cdMilan,type='l',col='magenta',ylim=c(0,15),xlab='',ylab='')
legend("top",c('Turin','Milan'),text.col=c('cyan','magenta'))
Run the code above in your browser using DataLab