View source: R/visualization.R
highlight_points | R Documentation |
Highlighting means that alpha value of other levels will be decreased.
highlight_points(p, column_name, levels, alpha_val = 0.1)
p |
A |
column_name |
A character scalar: name of a column in |
levels |
A character vector: levels to highlight. |
alpha_val |
A numeric scalar: alpha value to set for levels other than those in |
A ggplot2
object.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.