Commit 6b4e3ac9 authored by Renaud Lancelot's avatar Renaud Lancelot 🌍
Browse files

Revised grplot to resolve mismatch between legend and some plotted items.

parent 22a3e992
......@@ -145,7 +145,7 @@ authors <- function(){
"[E. Van Kleef (ITM)](evankleef@itg.be)",
"[R. Lancelot (Cirad)](mailto:renaud.lancelot@cirad.fr)",
"[C. Marsboom (Avia-GIS)](cmarsboom@avia-gis.com)",
"[F. Muñoz (Cirad)](facundo.munoz@cirad.fr)",
"[F. Mu\u00f1oz (Cirad)](facundo.munoz@cirad.fr)",
"[W. Wint (Ergo)](william.wint@gmail.com)"),
collapse=", ")
}
......@@ -477,16 +477,17 @@ grplot <- function(gr, nc, asp=2/3, cex=.7, nam){
mykey$padding.text <- 1.5
mykey$background <- grey(.95)
mykey$border <- grey(.5)
mykey$text <- list(c("Trend",
"95% conf. band",
"Lockdown start",
"Peak line (y=0)",
"Early/median/late\n lockdown effect",
"Mortality peak"), cex = cex + .2)
mykey$text <- list(c(
"Trend",
"95% conf. band",
"Lockdown start",
"Peak line (y=0)",
"Early/median/late\nlockdown effect",
"Mortality peak"), cex = cex + .1)
mykey$lines <- list(type = "b",
pch = c(NA, 15, NA, NA, NA, NA),
col = c(4, "light blue", 1, 4, 2, 4),
lty = c(4, 1, 0, 4, 4, 4),
pch = c(NA, 15, rep(NA, 4)),
col = c(4, 4, 1, 4, 2, 4),
lty = c(1, 0, 4, 2, 4, 4),
size = 3, lwd = 1.5)
mydata <- subset(gr, name %in% nam)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment