Closed yutannihilation closed 2 years ago
Originally reported at https://github.com/yutannihilation/gghighlight/issues/122#issuecomment-1076279258
library(gghighlight) #> Loading required package: ggplot2 d <- data.frame( idx = c(1, 1, 1, 2, 2, 2, 3, 3, 3), value = c(1, 2, 3, 10, 11, 12, 9, 10, 11), category = rep(c("a", "b", "c"), 3), stringsAsFactors = FALSE ) # Highlight the lines whose max values are larger than 10 ggplot(d, aes(idx, value, colour = category)) + geom_line() + gghighlight(max(value) > 10) #> Warning: Using `across()` in `filter()` is deprecated, use `if_any()` or #> `if_all()`. #> label_key: category
Created on 2022-03-23 by the reprex package (v2.0.1)
Lord, that was fast. Thanks ;)
Originally reported at https://github.com/yutannihilation/gghighlight/issues/122#issuecomment-1076279258
Created on 2022-03-23 by the reprex package (v2.0.1)