savet ar c'hartennoù
This commit is contained in:
parent
db9ade0eb4
commit
74801d2ece
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
||||||
data/
|
data/
|
||||||
tmp/
|
tmp/
|
||||||
|
res/
|
||||||
|
|
||||||
|
|
||||||
# ---> R
|
# ---> R
|
||||||
|
|
Binary file not shown.
|
@ -20,24 +20,43 @@ source("./scripts/enporzhiañ_kartenn.R")
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
## Sevel ur gartenn
|
## Sevel ur gartenn
|
||||||
anv <- "Agropyron repens"
|
library(ggplot2)
|
||||||
|
library(ggrepel)
|
||||||
|
|
||||||
|
|
||||||
|
for(s in unique(data$strollad)) {
|
||||||
|
#grDevices::cairo_pdf(paste0("./res/strollad_", s, ".pdf"), width=10, height=7, onefile=TRUE)
|
||||||
|
#pdf(paste0("./res/strollad_", s, ".pdf"), width=10, height=7, onefile=TRUE)
|
||||||
|
|
||||||
|
data_strollad <- data %>%
|
||||||
|
filter(strollad==s)
|
||||||
|
|
||||||
|
for(anv in unique(data_strollad$anv_latin)) {
|
||||||
|
grDevices::cairo_pdf(paste0("./res/",s, "_", anv, " (kumuniou).pdf"), width=10, height=7, onefile=TRUE)
|
||||||
sub_data <- data %>%
|
sub_data <- data %>%
|
||||||
filter(anv_latin==anv) %>%
|
filter(anv_latin==anv) %>%
|
||||||
tidyr::unite(., label, anv_bzg_1, anv_bzg_2, anv_bzg_3, na.rm=TRUE, sep="\n")
|
tidyr::unite(., label, anv_bzg_1, anv_bzg_2, anv_bzg_3, na.rm=TRUE, sep="\n")
|
||||||
|
|
||||||
|
|
||||||
pdf(paste0("./res/", anv, ".pdf"), width=10, height=7)
|
|
||||||
p <- ggplot(data=kumuniou_poly_simple)+
|
p <- ggplot(data=kumuniou_poly_simple)+
|
||||||
geom_sf(size=0.1, color="#bfbfbf")+
|
geom_sf(size=0.1, color="#bfbfbf")+
|
||||||
ggtitle(anv)+
|
ggtitle(substitute(''~italic(x), list(x=anv)))+
|
||||||
theme_void()+
|
theme_void()+
|
||||||
|
# Pikoù
|
||||||
|
geom_point(data=sub_data, aes(x=hed, y=led))+
|
||||||
# Anvioù
|
# Anvioù
|
||||||
geom_label(data=sub_data, alpha=.25, color="black", aes(x=hed, y=led, label=label))+
|
geom_label_repel(data=sub_data, color=alpha("black", 1), hjust=0,
|
||||||
theme(plot.title = element_text(face = "bold", hjust=0.5, size=12),
|
nudge_x=0.1, size=4,
|
||||||
|
aes(x=hed, y=led, label=label))+
|
||||||
|
# Neuz
|
||||||
|
theme(plot.title = element_text(face = "bold", hjust=0.5, size=20),
|
||||||
legend.position="bottom",
|
legend.position="bottom",
|
||||||
legend.title=element_text(size=10),
|
legend.title=element_text(size=10),
|
||||||
legend.key.width=unit(0.5, "inches"),
|
legend.key.width=unit(0.5, "inches"),
|
||||||
legend.key.height=unit(0.1, "inches"))
|
legend.key.height=unit(0.1, "inches"))
|
||||||
|
|
||||||
print(p)
|
print(p)
|
||||||
dev.off()
|
dev.off()
|
||||||
|
}
|
||||||
|
#dev.off()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue