gghighlight icon indicating copy to clipboard operation
gghighlight copied to clipboard

max_highlight should be counted on each facets when calculate_per_facet = TRUE

Open yutannihilation opened this issue 4 years ago • 0 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)

yutannihilation avatar May 19 '20 05:05 yutannihilation