scale_alpha_focus: scale_color_focus

Description Usage Arguments Examples

View source: R/scale_alpha_focus.R

Description

Alpha scale that focus specific factor levels. This is an alternative use of ggfocus function that uses the usual grammar of graphics.

Usage

1
scale_alpha_focus(focus_levels, alpha_focus = 1, alpha_other = 0.05)

Arguments

focus_levels

character vector with levels to focus.

alpha_focus

'alpha' for focused levels.

alpha_other

'alpha' for other levels.

Examples

1
2
3
 p <- ggplot(iris,aes(x = Petal.Length, y = Sepal.Length, alpha = Species)) + geom_point() +
  scale_alpha_focus(focus_levels = "versicolor")
 # Note this gives a warning because alpha doesn't always make sense with categorical variables.

Freguglia/ggfocus documentation built on Jan. 6, 2019, 3:08 a.m.