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)
|
||||||
sub_data <- data %>%
|
|
||||||
filter(anv_latin==anv) %>%
|
|
||||||
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)
|
for(s in unique(data$strollad)) {
|
||||||
p <- ggplot(data=kumuniou_poly_simple)+
|
#grDevices::cairo_pdf(paste0("./res/strollad_", s, ".pdf"), width=10, height=7, onefile=TRUE)
|
||||||
geom_sf(size=0.1, color="#bfbfbf")+
|
#pdf(paste0("./res/strollad_", s, ".pdf"), width=10, height=7, onefile=TRUE)
|
||||||
ggtitle(anv)+
|
|
||||||
theme_void()+
|
data_strollad <- data %>%
|
||||||
# Anvioù
|
filter(strollad==s)
|
||||||
geom_label(data=sub_data, alpha=.25, color="black", aes(x=hed, y=led, label=label))+
|
|
||||||
theme(plot.title = element_text(face = "bold", hjust=0.5, size=12),
|
for(anv in unique(data_strollad$anv_latin)) {
|
||||||
legend.position="bottom",
|
grDevices::cairo_pdf(paste0("./res/",s, "_", anv, " (kumuniou).pdf"), width=10, height=7, onefile=TRUE)
|
||||||
legend.title=element_text(size=10),
|
sub_data <- data %>%
|
||||||
legend.key.width=unit(0.5, "inches"),
|
filter(anv_latin==anv) %>%
|
||||||
legend.key.height=unit(0.1, "inches"))
|
tidyr::unite(., label, anv_bzg_1, anv_bzg_2, anv_bzg_3, na.rm=TRUE, sep="\n")
|
||||||
print(p)
|
|
||||||
dev.off()
|
p <- ggplot(data=kumuniou_poly_simple)+
|
||||||
|
geom_sf(size=0.1, color="#bfbfbf")+
|
||||||
|
ggtitle(substitute(''~italic(x), list(x=anv)))+
|
||||||
|
theme_void()+
|
||||||
|
# Pikoù
|
||||||
|
geom_point(data=sub_data, aes(x=hed, y=led))+
|
||||||
|
# Anvioù
|
||||||
|
geom_label_repel(data=sub_data, color=alpha("black", 1), hjust=0,
|
||||||
|
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.title=element_text(size=10),
|
||||||
|
legend.key.width=unit(0.5, "inches"),
|
||||||
|
legend.key.height=unit(0.1, "inches"))
|
||||||
|
|
||||||
|
print(p)
|
||||||
|
dev.off()
|
||||||
|
}
|
||||||
|
#dev.off()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue