Skip to content

Commit f8472dc

Browse files
committed
adding code for plotting the sampling at the commune level
1 parent 5930fe6 commit f8472dc

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

fucico_map.R

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,24 @@ par(op)
9999

100100
#export pdf 6 x 6 inches
101101

102+
#actual plotting by commune barycenter
103+
#extracting the sampled commune
104+
lisCo<-commu[commu$INSEE_COM %in% c("43033","63453"),]
105+
lisCo<-as.data.frame(coordinates(lisCo))
106+
lisCo$Res<-c("S","R")
107+
op<-par(mar=c(0,0,1,0))
108+
plot(departe,border="grey80",lwd=0.8,main="")
109+
plot(regions,add=TRUE,lwd=2)
110+
points(lisCo[,1:2],col=colovec[as.numeric(as.factor(lisCo$Res))],
111+
cex=1.5,pch=c(17,19)[as.numeric(as.factor(lisCo$Res))])
112+
text(x=coorddep$longitude,y=coorddep$latitude,col="white",font=2,
113+
labels=as.character(coorddep$nb_fields),cex=1.3)
114+
scalebar(c(191260,6060000),300000,"km",division.cex=1)
115+
par(op)
102116

103-
##############################################################################/
104-
#END
105-
##############################################################################/
106-
107-
117+
#export pdf 6 x 6 inches
108118

109-
temp<-commu[commu$INSEE_COM %in% c("43033","63453"),]
110119

111-
#the path to access to the barycentre of the commune
112-
temp@polygons[1][[1]]@labpt
120+
##############################################################################/
121+
#END
122+
##############################################################################/

session_info.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
collate French_France.1252
99
ctype French_France.1252
1010
tz Europe/Paris
11-
date 2021-01-31
11+
date 2021-02-02
1212

1313
- Packages -------------------------------------------------------------------------
1414
package * version date lib source

0 commit comments

Comments
 (0)