max_highlight should be counted on each facets when calculate_per_facet = TRUE
yutannihilation opened this issue · comments
library(gghighlight)
#> Loading required package: ggplot2
library(tibble)
d <- tribble(
~x, ~y, ~f,
"A", 1, "a",
"B", 2, "a",
"A", 3, "b",
"B", 4, "b"
)
ggplot(d, aes(x, y)) +
geom_col() +
facet_wrap(~ f) +
gghighlight(y, calculate_per_facet = TRUE, max_highlight = 1)
Created on 2020-05-19 by the reprex package (v0.3.0)