Highlighting means that alpha value of other levels will be decreased.
Examples
p <- ggplot2::ggplot(
mtcars,
ggplot2::aes(x = cyl, y = mpg, color = factor(am))
) +
ggplot2::geom_point()
highlight_points(p, "am", "0", alpha_val = 0.25)
#> Error in modifyList(layer$mapping, aes(alpha = .data$alpha_)): is.list(x) is not TRUE
p <- ggplot2::ggplot(
mtcars,
ggplot2::aes(x = cyl, y = mpg, color = factor(am))
) +
ggplot2::geom_point()
highlight_points(p, "am", "0", alpha_val = 0.25)
#> Error in modifyList(layer$mapping, aes(alpha = .data$alpha_)): is.list(x) is not TRUE