Closed yutannihilation closed 3 years ago
Fix #152, Fix #164
devtools::load_all("~/repo/gghighlight/") #> ℹ Loading gghighlight #> Loading required package: ggplot2 set.seed(2) d <- purrr::map_dfr( letters, ~ data.frame( idx = 1:400, value = cumsum(runif(400, -1, 1)), type = ., flag = sample(c(TRUE, FALSE), size = 400, replace = TRUE), stringsAsFactors = FALSE ) ) # Usual one ggplot(d) + geom_line(aes(idx, value, colour = type)) + gghighlight(max(value) > 19) #> label_key: type
# Preserve the colour and modify alpha instead ggplot(d) + geom_line(aes(idx, value, colour = type)) + gghighlight(max(value) > 19, unhighlighted_params = list(colour = NULL, alpha = 0.3)) #> label_key: type
Created on 2021-06-05 by the reprex package (v2.0.0)
Fix #152, Fix #164
Created on 2021-06-05 by the reprex package (v2.0.0)