# traceFrance.R traceFrance = function(variable,title="",color="white"){ NumLig = c( 54 ,57, 72, NA, 7, 70, 2 ,55, 45, 50, 49, 52 ,24 ,12, 46, NA ,NA, NA , 62 ,NA, 56, NA, 25, 82, 19, NA, NA ,NA, NA ,26, 8 ,32 ,47 ,48 ,80, 67 ,NA, 81, 41, 63, 51, 38, 18, 65, NA, 44, NA, 34, NA, 16, 53, 22, NA ,NA ,NA, 36, 33 ,78 ,66 ,71, 77 ,NA, 3, NA, 1, 69, 20, 79, 15, 64, 58, NA, 39 ,14, NA, 68, 35, 17, 21, 30, 13, 40, 23, 6, 5, 42, NA, 10, 43, 4, 37, 27 ,NA, 74, NA, NA, 73, 29, 31, 11, 28, 75, 60 ,59, 9, 76, NA, NA, NA, NA, NA, NA, 61, NA) indIdF = c( 28, 22, 20 ,26, 16, 17, 18) indParis = 24 col = color[NumLig] col[indIdF] = col[indParis] map('france', fill = TRUE, col = col) title(main=title) if (length(color >1)){ par(oma=c( 0,0,0,1))# reset margin to be much smaller. image.plot(legend.only=TRUE, zlim=range(variable),col=color[order(variable)], horizontal=TRUE) } }