Maps data values to alpha transparency.
Usage
scale_alpha(
plot,
name = ggplot2::waiver(),
trans = NULL,
limits = NULL,
range = NULL,
breaks = NULL,
labels = NULL,
...
)Arguments
- plot
A plotit object.
- name
Scale title (legend name).
- trans
Scale transformation.
NULLauto-detects, otherwise one of:"identity","discrete","reverse","binned". Unsupported values (e.g."log") produce a targeted error message.- limits
Data domain.
- range
Output alpha range as
c(min, max).NULL= defaultc(0.1, 1). Only meaningful for continuous scales.- breaks
Legend key positions.
- labels
Legend key labels.
- ...
Passed to the underlying ggplot2 scale function.
Examples
plotit(mtcars, encode(x = wt, y = mpg, alpha = hp)) |>
mark_point() |>
scale_alpha()