1 #draw (France or...) map with all sites of colors 'cols'
2 drawMapWithSites = function(M, cols=rep(1,nrow(M)))
9 plot(0,0,xlim=c(xMin,xMax),ylim=c(yMin,yMax),col="white")
10 #plot by color groups (limited to integers)
14 indices = (1:nrow(M))[cols==i]
15 if (length(indices) > 0)
16 points(M[indices,1],M[indices,2],col=i,xtitle=NULL)
20 #draw neighborhoods graph on top of a country map (or any other map)
21 drawNeighborhoodGraph = function(M, NI)
23 for (i in 1:length(NI))
26 lines(c(M[i,1],M[j,1]),c(M[i,2],M[j,2]))
30 #plot a matrix of curves (in rows)
31 plotCurves = function(M, cols=rep(1,nrow(M)))
34 rg = c(min(M),max(M)) #range for plotting
37 plot(M[i,],col=cols[i],ylim=rg,type="l")
38 if (i < n) par(new=TRUE)